RefineryCMS仪表板显示500内部服务器错误

时间:2013-03-09 09:43:25

标签: ruby-on-rails capistrano refinerycms

我被聘请为Rails 3.0.3和RefineryCMS 0.9.9构建的网站添加一些更改。 我是Rails和Capistrano的新手,因此我尝试对网站进行测试部署,以便掌握使用这些工具的工作。我下载了该网站的生产版本,并尝试重新部署它。我在config / deploy.rb文件中只更改了一些内容我没有更改Gemfile中的任何依赖项或db中的任何内容。我尝试使用github进行部署但是我遇到了ssh密钥问题,因此我使用自己的副本部署了它。我更改了服务器的所有必要权限,并且部署工作正常。 该网站虽然没有。主页标题为

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.

因此,我输入'cap deploy:rollback'来获取之前的正确版本。 但是,登录时,仪表板应该出现在哪里,我得到一个500.hmtl的页面。我似乎登录了该站点,但没有仪表板!

服务器主机是典型的nginx / 0.8.53 + Phusion Passenger 3.0.2(mod_rails / mod_rack)。 错误日志被禁用,所以我找不到任何东西!

以下是我使用的deploy.rb:

$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the     load path.
#require "rvm/capistrano"                  # Load RVM's capistrano plugin.
#set :rvm_ruby_string, '1.9.2'        # Or whatever env you want it to run in.
#set :rvm_type, :user
#require "bundler/capistrano"

set :application, "xxxxx"
#set :repository "ssh://hg@bitbucket.org/xxxx/xxxxx"
#set :repository,  "ssh://git@bitbucket.org/xxxx/xxxxx.git"
set :repository,  "git@github.com:xxxx/xxxxx.git"
set :scm, :git  
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion`   or   `none`
set :scm_username, 'xxxx'
set :scm_password, proc{Capistrano::CLI.password_prompt('git pass:')}

role :web, "www.xxxxx.gr"                          # Your HTTP server, Apache/etc
role :app, "www.xxxxx.gr"                          # This may be the same as your `Web`    server
role :db,  "www.xxxxx.gr", :primary => true # This is where Rails migrations will run

# If you are using Passenger mod_rails uncomment this: 
# if you're still using the script/reapear helper you will need
# these http://github.com/rails/irs_process_scripts
set :deploy_to, "/var/www/#{application}"
set :deploy_via, :copy #:remote_cache #:copy
set :keep_releases, 5
set :user, "xxxx"
set :use_sudo, true

# before "deploy:bundle_install", "deploy:install_bundler"
# after "deploy:update_code", "deploy:bundle_install"
after "deploy:update_code", "deploy:remove_packaged_assets"
after "deploy:update_code", "deploy:symlink_assets"
#after "deploy:symlink", "deploy:update_crontab"

namespace :deploy do
  task :start do ; end
  task :stop do ; end

desc "Symlink shared folders on each release."
task :symlink_assets do
 run "ln -nfs #{shared_path}/system #{release_path}/public/system"
  end

desc "Remove packaged assets"  
  task :remove_packaged_assets, :roles => :web do
    run "rm -f #{current_path}/public/javascripts/all.js"
    run "rm -f #{current_path}/public/stylesheets/all.css"
 end

 # desc "installs Bundler if it is not already installed"
 # task :install_bundler, :roles => :app do
 #   sudo "sh -c 'if [ -z `which bundle` ]; then echo Installing Bundler; sudo gem   install bundler; fi'"
 # end
 # 
 # desc "run 'bundle install' to install Bundler's packaged gems for the current deploy"
 # task :bundle_install, :roles => :app do
 #   run "cd #{current_path} && bundle install"
 # end

 desc "Update the crontab file"
  task :update_crontab, :roles => :app, :except => { :no_release => true } do
    run "cd #{release_path} && bundle exec whenever --update-crontab #{application}"
 end

 task :restart, :roles => :app, :except => { :no_release => true } do
    run "touch #{File.join(current_path,'tmp','restart.txt')}"
   end
 end

0 个答案:

没有答案