我一直在努力让 Rails 应用程序在共享的 Dreamhost 服务器中在乘客下工作。
我的最新错误如下。
$ rails console
/home/entrack/.gems/gems/haml_coffee_assets-1.12.0/lib/haml_coffee_assets.rb:10:in `require': /home/entrack/.gems/gems/haml_coffee_assets-1.12.0/lib/haml_coffee_assets/configuration.rb:28: odd number list for Hash (SyntaxError)
self.dependencies = { hc: 'hamlcoffee_amd' }
^
/home/entrack/.gems/gems/haml_coffee_assets-1.12.0/lib/haml_coffee_assets/configuration.rb:28: syntax error, unexpected ':', expecting '}'
self.dependencies = { hc: 'hamlcoffee_amd' }
^
/home/entrack/.gems/gems/haml_coffee_assets-1.12.0/lib/haml_coffee_assets/configuration.rb:28: syntax error, unexpected '}', expecting kEND
from /home/entrack/.gems/gems/haml_coffee_assets-1.12.0/lib/haml_coffee_assets.rb:10
from /home/entrack/.gems/gems/joosy-1.0.0.RC4/lib/joosy.rb:1:in `require'
from /home/entrack/.gems/gems/joosy-1.0.0.RC4/lib/joosy.rb:1
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in `require'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in `require'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in `require'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler.rb:112:in `require'
from /home/entrack/hubtrack.binarygeometry.net/config/application.rb:7
from /home/entrack/.gems/gems/railties-3.2.13/lib/rails/commands.rb:39:in `require'
from /home/entrack/.gems/gems/railties-3.2.13/lib/rails/commands.rb:39
from script/rails:6:in `require'
from script/rails:6
我的 config.ru 看起来像
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
run HubBlog::Application
ENV['GEM_HOME'] = '/home/entrack/.gems' + ':/usr/lib/ruby/gems/1.8'
require 'rubygems'
Gem.clear_paths
我的 Gemfile 喜欢
source 'https://rubygems.org'
gem 'rails', '3.2.13'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2'
gem 'joosy', '1.0.0.RC4'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'zurb-foundation', '~> 4.0.0'
gem 'execjs'
#gem 'therubyracer', #:platforms => :ruby
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
我认为 ruby 版本可能是问题(我在本地使用 1.9.3 和 rvm)
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
我应该减少损失并使用 fastCGI 安装它还是看起来可以修复?