By billsnapper
Hello, I setup a droplet and chose Ubuntu 12.04. I added Ruby/Rails but realized it came with Redmine which is a nice proof of functionality at runtime but I don’t need it. Upon further inspection I realized it’s running Ruby 1.87 and that’s not an option.
I setup rvm as a root user. Pushed my rails app code over to the instance, installed Ruby 2.1.1, ran bundle install to get all my gems installed and once I had migrated and populated my database, voila, I have an instance that can run from the command line (i.e. rails server). I am able to interact with it on port 3000 (the default) via an external system and all works fine. All great stuff. Now for the interesting part.
I want to run this same setup on Apache via phusion/passenger. The version in that instance looked a bit dated so I went through the update process. I can’t seem to get my instance running. When I try to start it I get errors indicating that:
“It looks like Bundler could not find a gem. Maybe you didn’t install all the gems that this application needs. To install your gems, please run: bundle install”. My assumption is that it’s finding the wrong ruby/gems. Any help here would be appreciated.
I added the following lines to the end of my apache2.conf file:
LoadModule passenger_module /usr/local/rvm/gems/ruby-2.1.1@rails-3.2.14/gems/passenger-4.0.40/buildout/apache2/mod_passenger.so <IfModule mod_passenger.c> PassengerRoot /usr/local/rvm/gems/ruby-2.1.1@rails-3.2.14/gems/passenger-4.0.40 PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.1.1@rails-3.2.14/wrappers/ruby </IfModule>
Stumped. Thanks in advance.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Turned out when I looked at the stack frame the bundler wasn’t able to install the “squeel” gem. It was specified in my Gemfile as: <br>gem ‘squeel’, :git => “git://github.com/ernie/squeel.git” <br> <br>Oddly it works when run from command line but not via passenger.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.