I'm trying to write a search enigne. Nothing fancy like google or so, just a simple one for educational purposes. I have done a little research and I know that Google uses Python, Java and C++. I on the other hand know C++, PHP, some Java and C# and even less Python. I see that Ruby on Rails have a lot of heat for some reason. I am willing to know a new language and framework as long as it isn't to difficult. I want something fast, rather portable, easy to maintain and update. I have made a few web …

Member Avatar
Member Avatar
+0 forum 1

Hi! I'm not a web developer, but I'm a blogger and I would like some tips on how to create a 404 error message or to do something about this message feom Blogger: "Sorry, the page you were looking for in this blog does not exist." I would like to redirect people from that error page to another page that is viable and which looks better and gives a better impression to the person who want so visit my blogspot blog. Can anyone help me? I don't know how to do that. Thank you so much!

Member Avatar
Member Avatar
+0 forum 1

Hello to all, I have a ruby script with a very long hash with more than 300 associations. The script looks like below: #!/usr/bin/env ruby Array_A = [] myHash = { "x1" => "2", "x2" => "0", "x3" => "1", . . . "X350" => "1" } myHash.keys.each do |z| Array_A << "This is key " + z end puts myHash.values.join("|") puts Array_A.join("|") But since the hash is very large, for reading purposes I'd like to put the hash at the end of the script and the each.do loop and puts command first, something like below. Is there a way …

Member Avatar
Member Avatar
+0 forum 8

I'm attemping to clone and install a Ruby application from github. I have it cloned, and am trying to run the "bundle install" command, but it failed the first time because of an issue with Rake. I installed it manually using "gem install rake -v '10.1.1'". That command was sucessful, but, when I tried to run "bundle install" again, it failed with the same error. The command line is copied below. I'm just starting out with Ruby. I have tried installing several applications and given up because of this same failure, actually, but just gave up figuring it wasn't my …

Member Avatar
Member Avatar
+0 forum 1

def y we need this in ruby i am beginner of ruby i donot understand what is use of def with out this we make code also i think according to my knowledge it is reserve word

Member Avatar
Member Avatar
+0 forum 1

I am a newbie programming Ruby. I have the below code. Method sum_to_n? which takes an array of integers and an additional integer, n, as arguments and returns true if any two elements in the array of integers sum to n. It should return true for the empty array with zero argument, but keeps returning false. def sum_to_n? (arr, n) hash = Hash.new(0) arr.each do |val| if hash.key? val return true else hash[n-val] = val end end return false end What am I doing wrong ?

Member Avatar
Member Avatar
+0 forum 9

Hi! I would like to know if anyone here have attempted installing Redmine V2.3.\* on IIS? If you did, can you please direct me to the right direction. What are the things should be done? I had tried it on my own, but I kept on having errors like "Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension" when building or "126: The specified module could not be found. - C:/RailsInstaller/Ruby1.9.3/li b/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/1.9/mysql2.so" when running "rake generate_secret_token" Please let me know if you need any clarifications from me.

Member Avatar
Member Avatar
+0 forum 1

Hello all I have decided that I will participate in an online coding contest.i just want to ask which programming language is appropriate or powerful for a programming contest?ruby or python?i want to participate with python or ruby as my primary language.i have a little exp. with python but don't like the whites pace rule.does ruby has it?I want a scripting language because of ease of developement and less worrying of syntax. So,which one you reckon?python or ruby?

Member Avatar
Member Avatar
+0 forum 7

Hello daniweb community i'm new here and glad to join this amazing website. Well want I need to understand is how I learn to become a competent computer science major and learn to write code very well. I have always had a knack for this and I love it alot but i'm lost on where I should start. At the moment im learning ruby and have been messing around with RoR. So what language should I learn first? I already know that computer science is more about how it works and algorithms and ETC. I want to go into my …

Member Avatar
Member Avatar
+0 forum 6

I need to add the following features to my existing code (posted below) in Rails using Jquery, JSON, Ruby and HTML. I have a lot of ideas and researched a bit but Itd be great if someone can help me with integrating them: I need to add a feature to sign a url associated with each file in my table.Where the url is say a 'string1' + the prefix from <%= hidden_field_tag :prefix, @prefix %> I was thinking of using the 'aws_cf_signer' gem in rails and code such as : - signer = AwsCfSigner.new('./private-key-file.pem') url = signer.sign(url) I need to …

Member Avatar
Member Avatar
+0 forum 1

Hi i m just learning rails and i want to import my sql data to rails .. i have created database and i had run rake to create shema etc... i m using windows 7 thx

Member Avatar
Member Avatar
+0 forum 2

Please answer these questions for me: Q1: Write a method, pow, that takes two (non-negative, integer) numbers, base and exponent and returns base raised to the exponent power. (No fair using Ruby's base ** exponent notation!). Q2: Write a method, sum which takes an array of numbers and returns the sum of the numbers. Q3: Write a method, is_prime?, that takes a number num and returns true if it is prime and false otherwise. You may wish to use the modulo operation: 5 % 2 returns the remainder when dividing 5 by 2: 1. If num is divisible by i, …

Member Avatar
Member Avatar
+0 forum 4

I want to make a game somwhat akin in size and complexity to SNES Zelda.

Member Avatar
+0 forum 0

Hey! Here is my update action in users_controller.rb and I want to test it with RSpec but it doesnt seem to work for me. Can somebody notice a mistake? def update @user = User.find(params[:id]) respond_to do |format| if @user.update_attributes(params[:user]) format.html { redirect_to edit_user_path(@user), :notice => "Your settings were successfully updated."} format.json { head :no_content } else flash[:notice] = "Something went wrong." format.html { render action: "edit" } format.json { render json: @user.errors, status: :unprocessable_entity } end end end it "changes user settings" do @user = create_and_login_user @attr = {:email=>"abc@ad.oo"} put :update, :id => @user.id, :user => @attr @user.reload @user.email.should eq("abc@ad.oo") …

Member Avatar
Member Avatar
+0 forum 1

Somewhat new to rails and trying to build something to learn, but having an issue. I have successfully created one form field that reads from a collection of categories. I generated scaffolding for the categories and two fields catId and name. After plugging in the field everything worked perfectly. I have tried to replicate this with a different name now (zipCode), but am getting an error saying an undefined method of zipCode when trying to save the event (the form that is being filled out). I'm not understanding why this isn't working as easily as the categories did. I have …

Member Avatar
Member Avatar
+0 forum 1

I need to sort tables with dynamical content with rails. I could use the RailsCast tutorial ([http://railscasts.com/episodes/228-sortable-table-columns](http://railscasts.com/episodes/228-sortable-table-columns)) but as I'm not using any specific method in a controller, it doesn't seem appropriate solution. I found out about the jquery tablesorter, but it doesn't seem to work. Where the solution might be? <table id="myTable" class="span7"> <tr> <th>Name</th> <th>Content</th> <th>Deadline</th> <th>Assignee</th> <th></th> <th></th> </tr> <%= render @project.tasks %> </table> application.js $(document).ready(function(){ $("#myTable").tablesorter(); }); Where the solution might be?

Member Avatar
Member Avatar
+0 forum 1

What are the various Components of Rails?

Member Avatar
Member Avatar
+0 forum 2

I hear that RUby can be used for desktop development, yet I haven't seen any showcases. I am currently learning C++ but have always had my eyes on Ruby. Is it true? I know Ruby On Rails is for web development. What are the capabilities of ROR? Thanks in advance.

Member Avatar
Member Avatar
+0 forum 3

hello it's been awhile .. it's my first time using ruby(on Rails), and i've downloaded what is needed(i think, based on my searches), Ruby, Rails and gem, but i'm not sure if they are properly installed because they don't seem to appear (?) Also it's my first time using Aptana, i have all these to create a project using Ruby on Rails as server and JS for the coding .. hopefully i can finish this by tomorrow .. thanks!

Member Avatar
Member Avatar
+0 forum 1

HI guys... i have installed solr 4.2 in my system.. i wanted to integrate it with rails and thus, included the 2 sunspot gems.. gem 'sunspot_rails', '~>2.0.0' gem 'sunspot_solr', '~>2.0.0' now, the local instance of solr present in sunspot_solr gem can be found at "http://localhost:8982/solr" .. when checking the information, it says that the version is 3.5.. is there any way that i can upgrade this to version 4.2, i.e, the version that is installed in my system?

Member Avatar
Member Avatar
+0 forum 5

Hi just start learning rails i found some difficulties to start the server under linux mint please find the errors i get /var/lib/gems/1.8/gems/railties-3.2.13/lib/rails/script_rails_loader.rb:11: warning: Insecure world writable dir /sbin in PATH, mode 040777 /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:216: warning: Insecure world writable dir /sbin in PATH, mode 040777 /var/lib/gems/1.8/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) from /var/lib/gems/1.8/gems/execjs-1.4.0/lib/execjs.rb:5 from /var/lib/gems/1.8/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `require' from /var/lib/gems/1.8/gems/coffee-script-2.2.0/lib/coffee_script.rb:1 from /var/lib/gems/1.8/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `require' from /var/lib/gems/1.8/gems/coffee-script-2.2.0/lib/coffee-script.rb:1 from /var/lib/gems/1.8/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `require' from /var/lib/gems/1.8/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1 from /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require' from /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require' from /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each' from /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `require' from /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each' from /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require' from /var/lib/gems/1.8/gems/bundler-1.3.5/lib/bundler.rb:132:in `require' from …

Member Avatar
Member Avatar
+0 forum 3

My team has been doing Java for a long time. We are switching to Ruby. We are finding that Ruby has limitations and that we have to do certain things in Java. I'm trying to find a way to call Java code from Ruby. I'm searching Google and such, and I always end up on a page describing how to call Java code from JRuby. That's not what I want. Then I start to wonder why we're NOT using JRuby?! Instinctively, I'm thinking Java and Ruby is what we're doing. JRuby is the best of both worlds. What am I …

Member Avatar
Member Avatar
+0 forum 2

Hi guys, I am new to ruby i already have an experience in the core php and zend framework.I need to clarify the below doubts, Is oops in ruby is completely different from other oops concept languages like java,c#. Can you pls help me out. Thank you, Regards, Premnath

Member Avatar
Member Avatar
+0 forum 1

Hi, I'm developing an application which needs to check user-inputted credentials against a Mysql database running on a web server. Does anybody know how I could communicate between c++ and a PHP or Ruby on Rails page and then parse the results back to the client? Many Thanks

Member Avatar
Member Avatar
+0 forum 1

Hi, I have module that imports data from json file to hash. Json file is pretty big so I don't want loading to take place on every request because it takes some time. It would be best to do this just on server start. I have a class variable in module called "data" which I'd like to set only on server start and then I can access to it on every request with SomeModule.data (I use mattr_accessor). I tried to import data in application config.after_initlize method but id doesnt work - data persists only on first request and on second …

Member Avatar
Member Avatar
+0 forum 2

perl vs ruby. what is the difference in speed/popularity and performance? thanks

Member Avatar
Member Avatar
+0 forum 1

class variables have a niche to fill: ***visibility to a class and its instances, and to no one else. Typically, this means being visible in class-method definitions and instancemethod definitions, and sometimes at the top level of the class definition.*** I understood that. But didn't find any example of the part - `sometimes at the top level of the class definition.` Could anyone help me here with example what it means by?

Member Avatar
Member Avatar
+0 forum 6

This is below is an example of superclass/subclass construct : C:\>irb --simple-prompt >> class Parent >> @@x = 10 >> end => 10 >> class Child < Parent >> @@x = 12 >> end => 12 >> class Parent >> puts "@@X = #{@@x}" >> end @@X = 12 => nil And the above is also understood.But I wanted to check if possible or not when two class are defined seprately as an `standalone class` anyway to define the super/sub relation between them? I tried the below but it doesn't work. May be not the way I tried: C:\>irb --simple-prompt …

Member Avatar
Member Avatar
+0 forum 4

I'm converting a Java/J2EE app over to Ruby/Rails. I need a solution for the CORBA calls. I see that Ruby has its own distributed API (DRb) and there are a few 3rd party CORBA tools, but nothing seems viable for actually doing CORBA in Ruby. What are you guys using professionally? Disclaimer: I've already searched Google and tried a number of tools. So please only suggest somethig if you are personally using the tools or 100% sure they work. :)

Member Avatar
Member Avatar
+0 forum 1

I am using this [application example][1] and try to model it to fit my needs. I am modelling your index.html.erb to fit my needs. I want to get rid of "start" button in order to prevent single-file upload (I dont want it), but it seems that "start upload"(multiple upload)-button is on "start" button dependent and I could not find how to modify the script in order to get rid of "start"-buttom but to keep the functionality of a "start upload" -button. Can you give me some hints how to get rid of those dependencies? Hier is the short code cut-off: …

Member Avatar
Member Avatar
+0 forum 1

The End.