0
votes

I've been searching google for 2 days and still haven't managed to work out what I am doing wrong.

I'm totally new to RoR and following the RoR Tutorial by Michael Hartl

The tutorial requires default gemset... $ rvm use 2.0.0@railstutorial_rails_4_0 --create --default Using /Users/mhartl/.rvm/gems/ruby-2.0.0-p0 with gemset railstutorial_rails_4_0

I've followed everything as per the instructions and managed to create a new app. Next step is to modify the gemfile (done)

next I'm told to do a 'Bundle Update'

At this point I get the following error message (before it continues successfully to the end).

Error loading RubyGems plugin "/Users/mike/.rvm/gems/ruby-2.0.0-p195@global/gems/rubygems-bundler-1.1.1/lib/rubygems_plugin.rb": Could not find 'rubygems-bundler' (>= 0) among 52 total gem(s) (Gem::LoadError) Fetching gem metadata.... ... Your bundle is updated

If I try it as sudo bundle update I get this...

    /Users/mike/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems  /dependency.rb:296:in `to_specs': Could not find 'bundler' (>= 0) among 16 total gem(s) (Gem::LoadError)
from /Users/mike/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from /Users/mike/.rvm/rubies/ruby-2.0.0-p195/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /Users/mike/.rvm/gems/ruby-2.0.0-p195@global/bin/bundle:22:in `<main>'
from /Users/mike/.rvm/gems/ruby-2.0.0-p195@global/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/mike/.rvm/gems/ruby-2.0.0-p195@global/bin/ruby_noexec_wrapper:14:in `<main>'

I'm totally baffled. I've checked on the directory and /Users/mike/.rvm/gems/ruby-2.0.0-p195@global/gems/rubygems-bundler-1.1.1/lib/rubygems_plugin.rb" is definitely there.

I know other people are having similar issues, but any help would be very gratefully received, im totally stuck

1
can you try gem install bundler ? - Jesse Wolgamott
Hi Jesse, I think the problem lies with me trying to follow tutorial instructions and running 'bundle update' apparently the instructions are wrong. Thanks for your help though - Mike

1 Answers

0
votes

First, check your ruby location, as following:

which ruby

You should get /home/mike/.rvm/rubies/ruby-2.0.0-p195/bin/ruby Than, check your rails location, as following:

which rails

You should get /home/mike/.rvm/gems/ruby-2.0.0-p195/bin/rails If everything is correct, do the following:

gem install bundler

When bundler successfully installed, try to create a simple rails application:

rails new my_first_app

It should create a folder: *my_first_app*

cd my_first_app
bundle
rails s

It should run a development server on port 3000 Open your browser and visit: localhost:3000.

Your Rails should work correctly.