3
votes

I hope you can help me. I am working on a small Sinatra Rails application. I have Ruby installed on Mac OSX using RVM (currently using ruby 1.9.2)

I changed my app to include some new gems and to use bundler/setup but I receive the following error when I start the server:

/Users/Matt/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- bundler/setup (LoadError)
from /Users/Matt/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from application.rb:2:in `<main>'

I am fairly sure I have something going wrong here, I'm just not sure what or how to fix it.

Running the which commands receives the following output:

which ruby: /Users/Matt/.rvm/rubies/ruby-1.9.2-p290/bin/ruby

which bundle: /Users/Matt/.rvm/gems/ruby-1.9.2-p290/bin/bundle

which gem: /Users/Matt/.rvm/rubies/ruby-1.9.2-p290/bin/gem

Please can someone help me as this is starting to drive me a little crazy.

Many thanks in advance for your help.

1
maybe try adding require 'rubygems' somewhere at the top? - Adrian Serafin
try running gem install bundler followed by bundle install from inside your application. - stephenmurdoch
Thanks guys. I have require 'rubygems' at the top of my environment.rb and application.rb files. I also re-ran gem install bundler with the following output: 1 gem installed Installing ri documentation for bundler-1.0.21... Installing RDoc documentation for bundler-1.0.21... - Matt Gifford
and bundle install worked too. Running bundle show bundler outputs this: /Users/Matt/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21 - Matt Gifford
you don't need require 'rubygems' in 1.9. Just run bundle install and remove the bundler/setup line from your app. - three

1 Answers

1
votes

from the @stephenmurdoch's comment above:

try running gem install bundler followed by bundle install from inside your application.