Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails Sinatra application not loading Gems. Do I have them in the wrong place?

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.

like image 977
Matt Gifford Avatar asked Jan 22 '26 10:01

Matt Gifford


1 Answers

from the @stephenmurdoch's comment above:

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

like image 57
Patrick Klingemann Avatar answered Jan 25 '26 01:01

Patrick Klingemann



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!