Ruby on rails Rails3.2+;乘客3+;Apache2&x2B;Ubuntu上的RVM
我正在努力让乘客+rvm+apache+rails正常工作。打开页面时,我从乘客处收到以下错误消息:Ruby on rails Rails3.2+;乘客3+;Apache2&x2B;Ubuntu上的RVM,ruby-on-rails,ubuntu,rvm,passenger,rvm-capistrano,Ruby On Rails,Ubuntu,Rvm,Passenger,Rvm Capistrano,我正在努力让乘客+rvm+apache+rails正常工作。打开页面时,我从乘客处收到以下错误消息: .bundle/config .rvmrc 问题来自你的档案 1) 您需要将gem'rvm capistrano'移动到开发组-这样它就不会安装到shared/bundle 2) 您是否碰巧使用了gem'rvm capistrano',:lib=>'rvm/capistrano',lib部分不是必需的,实际上很可能是破坏了东西 在再次部署之前,您应该清除服务器上的共享/捆绑。您的$GEM\u路
.bundle/config .rvmrc
问题来自你的档案 1) 您需要将
gem'rvm capistrano'
移动到开发组-这样它就不会安装到shared/bundle
2) 您是否碰巧使用了gem'rvm capistrano',:lib=>'rvm/capistrano'
,lib部分不是必需的,实际上很可能是破坏了东西
在再次部署之前,您应该清除服务器上的
共享/捆绑
。您的$GEM\u路径设置是否正确?您是否在Gemfile中指定了特定的Capistrano路径?日志文件管理器中是否有其他信息?您的deploy.rb
外观如何?也许你把捆绑目录搞混了你的应用程序根目录中有一个.bundle
目录吗?如果是这样,.bundle/config
看起来怎么样?@Samy:我检查了本地路径并编辑了原始问题。有趣的是,我在接受local.rvmrc尝试“cap shell”时出错:/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/Ruby/1.8/rubygems.rb:827:在“report\u activate\u error”中:找不到RubyGem capistrano(>=0)(Gem::LoadError)@Matthias:Yes,.bundle存在。我添加了上面两个文件的内容。非常感谢。这解决了我的问题。我已经有一年没有做rails了,仍然不明白为什么将rvm capistrano安装为共享gem会造成危害,但实际上,我并不想知道:-)
Ruby (Rack) application could not be started
These are the possible causes:
There may be a syntax error in the application's code. Please check for such errors and fix them.
A required library may not installed. Please install all libraries that this application requires.
The application may not be properly configured. Please check whether all configuration files are written correctly, fix any incorrect configurations, and restart this application.
A service that the application relies on (such as the database server or the Ferret search engine server) may not have been started. Please start that service.
Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.
Error message:
uninitialized constant Capistrano
Exception class:
NameError
Application root:
/var/www/www.pixtur.org/rails/current
Backtrace:
File Line Location
0 /var/www/www.------------.----/rails/shared/bundle/ruby/1.9.1/gems/rvm-capistrano-1.2.0/lib/rvm/capistrano.rb 3 in `'
1 /home/pixtur/.rvm/gems/ruby-1.9.2-p180@global/gems/bundler-1.1.3/lib/bundler/runtime.rb 74 in `require'
2 /home/pixtur/.rvm/gems/ruby-1.9.2-p180@global/gems/bundler-1.1.3/lib/bundler/runtime.rb 74 in `rescue in block in require'
3 /home/pixtur/.rvm/gems/ruby-1.9.2-p180@global/gems/bundler-1.1.3/lib/bundler/runtime.rb 62 in `block in require'
4 /home/pixtur/.rvm/gems/ruby-1.9.2-p180@global/gems/bundler-1.1.3/lib/bundler/runtime.rb 55 in `each'
5 /home/pixtur/.rvm/gems/ruby-1.9.2-p180@global/gems/bundler-1.1.3/lib/bundler/runtime.rb 55 in `require'
6 /home/pixtur/.rvm/gems/ruby-1.9.2-p180@global/gems/bundler-1.1.3/lib/bundler.rb 119 in `require'
require "bundler/capistrano"
set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"") # Read from local system
# Load RVM's capistrano plugin:
require "rvm/capistrano"
set :user, 'pixtur'
set :domain, 'www.--------------.com'
set :applicationdir, "/var/www/www.somedomain.com/rails"
set :scm, 'git'
set :repository, "gitosis@------------------.git"
#set :git_enable_submodules, 1 # if you have vendored rails
set :branch, 'master'
set :git_shallow_clone, 1
set :scm_verbose, true
set :deploy_to, applicationdir
set :use_sudo, false
#set :scm, :git
role :app, domain
role :web, domain
role :db, domain, :primary => true
# additional settings
default_run_options[:pty] = true # Forgo errors when deploying from windows
namespace :deploy do
task :start, :roles => :app do
run "touch #{current_release}/tmp/restart.txt"
end
task :stop, :roles => :app do
end
task :restart, :roles => :app do
run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
end
desc "Install bundler"
task :bundle_install do
begin
run "bundle install"
rescue
gem_install_bundler
end
end
end
---
BUNDLE_FROZEN: '1'
BUNDLE_PATH: /var/www/www.----------.---/rails/shared/bundle
BUNDLE_DISABLE_SHARED_GEMS: '1'
BUNDLE_WITHOUT: development:test
if [[ -s "/Users/pixtur/.rvm/environments/ruby-1.9.2-p180@pixtur-org" ]] ; then
. "/Users/pixtur/.rvm/environments/ruby-1.9.2-p180@pixtur-org"
else
rvm --create use "ruby-1.9.2-p180@pixtur-org"