0

I am trying to get WEBrick to work

Output of rvm gemset list

gemsets for ruby-1.8.7-p374 (found in /home/simon/.rvm/gems/ruby-1.8.7-p374)
   (default)
   global
=> simple_cms

my gem list gem list

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.0)
actionpack (3.0.0)
activemodel (3.0.0)
activerecord (3.0.0)
activeresource (3.0.0)
activesupport (3.0.0)
arel (1.0.1)
builder (2.1.2)
bundler (1.0.0)
bundler-unload (1.0.2)
erubis (2.6.6)
executable-hooks (1.3.1)
gem-wrappers (1.2.4)
i18n (0.4.2)
mail (2.2.20)
mime-types (1.25.1)
mysql2 (0.3.15)
polyglot (0.3.4)
rack (1.2.8)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (3.0.0)
railties (3.0.0)
rake (10.1.1)
rubygems-bundler (1.4.2)
rvm (1.11.3.9)
thor (0.14.6)
treetop (1.4.15)
tzinfo (0.3.38)

and when I run the rails s to start WEBrick, I got

/home/simon/.rvm/gems/ruby-1.8.7-p374@global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:74:in `setup': undefined method `rubygems' for Bundler:Module (NoMethodError)
    from /home/simon/.rvm/gems/ruby-1.8.7-p374@global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:114:in `check'
    from /home/simon/.rvm/gems/ruby-1.8.7-p374@global/gems/rubygems-bundler-1.4.2/lib/rubygems-bundler/noexec.rb:121
    from /home/simon/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:118:in `gem_original_require'
    from /home/simon/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:118:in `require'
    from /home/simon/.rvm/gems/ruby-1.8.7-p374@global/gems/rubygems-bundler-1.4.2/lib/rubygems_executable_plugin.rb:4
    from /home/simon/.rvm/gems/ruby-1.8.7-p374@global/gems/executable-hooks-1.3.1/lib/executable-hooks/hooks.rb:50:in `call'
    from /home/simon/.rvm/gems/ruby-1.8.7-p374@global/gems/executable-hooks-1.3.1/lib/executable-hooks/hooks.rb:50:in `run'
    from /home/simon/.rvm/gems/ruby-1.8.7-p374@global/gems/executable-hooks-1.3.1/lib/executable-hooks/hooks.rb:49:in `each'
    from /home/simon/.rvm/gems/ruby-1.8.7-p374@global/gems/executable-hooks-1.3.1/lib/executable-hooks/hooks.rb:49:in `run'
    from /home/simon/.rvm/gems/ruby-1.8.7-p374@simple_cms/bin/ruby_executable_hooks:10
1

You should not use Rails 3.0.0

Solution

delete old gemset

rvm gemset delete <gemset-name>

create a new gemset and use it

rvm gemset create <gemset-name>
rvm gemset use <gemset-name>

You can install the newest verson of rails. On 5 of march 2014, it is 4.0.3 .

If you want to stay with version 3, you need to install newest version of it which is 3.2.17. do this by running this command

gem install rails -v=3.2.17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.