我使用RVM,Ruby 1.9.2,Rails 3,为Nginx配置Passenger 3.0.2, 我设置了服务器配置正确。目前为止的另一个应用程序RVM,Ruby 1.9.2,Rails 3,Passenger 3.0.2(Bundler :: GemNotFound)
但对于新的应用程序,启动时服务器
http://myapp.local(其配置与主机上的点的Nginx的conf服务器绑定) 它返回(捆扎机:: GemNotFound)错误。如何解决这个问题?
谢谢。
我使用RVM,Ruby 1.9.2,Rails 3,为Nginx配置Passenger 3.0.2, 我设置了服务器配置正确。目前为止的另一个应用程序RVM,Ruby 1.9.2,Rails 3,Passenger 3.0.2(Bundler :: GemNotFound)
但对于新的应用程序,启动时服务器
http://myapp.local(其配置与主机上的点的Nginx的conf服务器绑定) 它返回(捆扎机:: GemNotFound)错误。如何解决这个问题?
谢谢。
不要相信这是大多数Rails开发人员都会遇到的常见问题。看看这篇文章,详细介绍我认为你正在寻找的修复。祝你好运。 http://dalibornasevic.com/posts/21-rvm-and-passenger-setup-for-rails-2-and-rails-3-apps
有关更清晰和最新的解决方案,请查看using RVM rubies with 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
。
我不知道为什么,但我在全球宝石安装缺少的宝石和它的作品!
对于基于RVM的应用程序和乘客,您可以参考这些文档:
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
安装后脚本打印的说明了如何设置Apache的配置的PassengerDefaultRuby变量。瞧! - 没有额外的脚本和LOAD_PATH操作;)
请包括错误的堆栈跟踪,以便我们可以更深入地了解它。 – raidfive 2011-01-25 22:06:40
这是从乘客http://shorttext.com/w485coz56bs – Harry 2011-01-26 00:10:10
它说:“找不到任何的来源(捆扎机:: GemNotFound)activemerchant-1.10.0”的回溯,但找不到任何宝石。不与主动商贩相关。 (经过测试,重新配置Gemfile) – Harry 2011-01-26 00:11:13