Topic: can't start 'ruby script/server'

I am a noob, so I am nearly helpless in trying to do this tutorial.  I did an update, and now I am getting the following error when I start the webrick server;

C:\rails\cookbook>ruby script/server
c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:827:in `report_activate_error': RubyGem version error: rack(1.0.0 not ~> 1.0.1) (Gem::LoadError)
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:261:in `activate'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:68:in `gem'
        from c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller.rb:34
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in new_constants_in'
        from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
        from c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:2
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from script/server:3

I am guessing the ubyGem version error: rack(1.0.0 not ~> 1.0.1) (Gem::LoadError) is the source of my error, but I have no idea how to fix this.  Any advice out there?

Re: can't start 'ruby script/server'

never  mind - found something on Google that did the trick;

C:\rails\cookbook>gem install rack
Successfully installed rack-1.0.1
1 gem installed
Installing ri documentation for rack-1.0.1...
Installing RDoc documentation for rack-1.0.1...

C:\rails\cookbook>ruby script/server
=> Booting WEBrick
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2009-12-12 14:14:33] INFO  WEBrick 1.3.1
[2009-12-12 14:14:33] INFO  ruby 1.8.6 (2007-09-24) [i386-mswin32]
[2009-12-12 14:14:33] INFO  WEBrick::HTTPServer#start: pid=1180 port=3000

Re: can't start 'ruby script/server'

Thanks to jmtoporek for his self-answer smile I can also offer the way to solve this problem.

In fact, error in topicstart message says that WEBrick wants us to use rack 1.0.1. So, you can do it:

  1. By using console, as it is on the message above

  2. By using your IDE's update service. In NetBeans it is: Tools -> RubyGems -> New Gems -> Install Locall

Don't forget 2 things:

  • download rack 1.0.1

  • uninstall your current rake

Last edited by Ybr (2010-04-11 10:04:22)