rookie to RoR here and also experiencing errors with $ruby script/server When I execute the above command, instead of WEBrick starting up, I get an error message: ./script/../config/boot.rb:29: undefined method ''gem'' for main:Object (NoMethodError) from script/server:2 I have ruby 1.8.4 installed, rubygems 0.8.11, and Rails 1.2.3 I was also pleased to get MySQL running so easily on LINUX (this is SUSE Enterprise Desktop 10 from Novell). I could probably find another way to start up WEBrick, but I prefer to use the above command. Note: This "ruby script/server" command was performed from a directory named "shovell" that was created using the "rails shovell" command from my home directory, and it appears that the associated Rails application directories were cleanly created by "rails shovell". This is discussed in Lenz'' book on RoR Web Applications. Greatly appreciate in advance your valuable time in reading this and any assistance you can give. Regards, ambulance_driver -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Apr 24, 2007, at 12:53 AM, Greg Neely wrote:> > rookie to RoR here and also experiencing errors with > > $ruby script/server > > When I execute the above command, instead of WEBrick starting up, I > get > an error message: > > ./script/../config/boot.rb:29: undefined method ''gem'' for main:Object > (NoMethodError) from script/server:2 > > I have ruby 1.8.4 installed, rubygems 0.8.11, and Rails 1.2.3Update your rubygems to >= 0.9.0 sudo gem update --system> > I was also pleased to get MySQL running so easily on LINUX (this is > SUSE Enterprise Desktop 10 from Novell). > > I could probably find another way to start up WEBrick, but I prefer to > use the above command. > > Note: This "ruby script/server" command was performed from a directory > named "shovell" that was created using the "rails shovell" command > from > my home > directory, and it appears that the associated Rails application > directories > were cleanly created by "rails shovell". This is discussed in Lenz'' > book on RoR Web Applications. > > Greatly appreciate in advance your valuable time in reading this > and any > assistance you can give. > > Regards, > ambulance_driver-Rob Rob Biedenharn http://agileconsultingllc.com Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org
A follow-up on the above notion that a different application server might make a difference. After installing Mongrel, and starting up the Mongrel application server with: sudo mongrel_rails start -p 3000 (Above command land parameter "-p" specifieds start on port 3000) I receive the following messages: **Starting Mongrel listening at 0.0.0.0:3000 **Starting Rails with development environment... /root/shovell/config/boot.rb:29: undefined method ''gem'' for main:Object (NoMethodError) ...many messages forward from this point... The above message error is the same for what I received when trying "ruby script/server" to start up the WEBrick server, so I guess on my part is that I have some kind of environmental problem on my LINUX distribution. Comments? Suggestions? -ambulance_driver -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Rob Biedenharn wrote:> On Apr 24, 2007, at 12:53 AM, Greg Neely wrote: > >> (NoMethodError) from script/server:2 >> >> I have ruby 1.8.4 installed, rubygems 0.8.11, and Rails 1.2.3 > > Update your rubygems to >= 0.9.0 > > sudo gem update --system > >> my home >> ambulance_driver > -Rob > > Rob Biedenharn http://agileconsultingllc.com > Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.orgRob, As we say in EMS, a.k.a. "Emergency Medical Services", a.k.a. "Earns Money Sleeping", U-DA-MAN...:-) The command as root: gem update --system configured rubygems to 0.9.2. At that point, I tried: cd /shovell (a rails application directory) followed by the previous "bad actor": ruby script/server Mongrel booted beautifully, and: http://0.0.0:3000 took me to the Welcome Aboard page for Rails. Many thanks, Rob! To return the favor, I have a small RUBY program below to read some data from a flat file. #!/usr/bin/ruby buffer_as_array=IO.readlines("testfile") lines=buffer_as_array.size print "myfile has #{lines} lines in it.\n" for x in buffer_as_array do str=x.chomp! t,v,d,q = str.split(" ") print "#{t} #{v} #{d} #{q}\n" end Try to use the same blank delimited data and read it into objects using Apple''s Objective-C in the XCode IDE, and the same functionality will cost you many more loc. LOL. Onward and upward with Java and Ruby, ambulance_driver (Greg Neely, M.S., NREMT-B) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---