Trying to get Rails, RVM, Apache, MySQL running on Ubuntu 12.04

Posted March 27, 2014 3.2k views
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/ 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 Stumped. Thanks in advance.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer
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:
gem 'squeel', :git => "git://"

Oddly it works when run from command line but not via passenger.