RVM, Ruby 1.9.2, Rails 3, Passenger 3.0.2 (Bundler :: GemNotFound)

I am using RVM, Ruby 1.9.2, Rails 3, Passenger 3.0.2 configured for Nginx, I will configure the server configuration correctly. Another application still working.

But for a new application, when loading the server

http: //myapp.local (it is configured with hosts to bind to the server on Nginx conf) It returns an error (Bundler :: GemNotFound). How to get around this?

Thank.

+2
source share
4 answers

RVM Passenger.

if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm')
  begin
    gems_path = ENV['MY_RUBY_HOME'].split(/@/)[0].sub(/rubies/,'gems')
    ENV['GEM_PATH'] = "#{gems_path}:#{gems_path}@global"
    require 'rvm'
    RVM.use_from_path! File.dirname(File.dirname(__FILE__))
  rescue LoadError
    raise "RVM gem is currently unavailable."
  end
end

# If you're not using Bundler at all, remove lines bellow
ENV['BUNDLE_GEMFILE'] = File.expand_path('../Gemfile', File.dirname(__FILE__))
require 'bundler/setup'

<rails-app-path>/config/setup_load_paths.rb.

0

rvm Passenger :

https://rvm.io/integration/passenger http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerRuby

, :

$ gem list --local |grep passenger # returns nothing

Apache, :

$ gem install passenger # for a specific version use the '--version' flag
$ gem list --local |grep passenger
passenger (4.0.18)
$ passenger-install-apache2-module

script , PassengerDefaultRuby Apache. ! - LOAD_PATH;)

0

, , Gem Global Gemset, !

-2

All Articles