haml_coffee_assets / configuration.rb:28:Hash的奇数列表(SyntaxError)||导轨/乘客/ Dreamhost的

时间:2013-05-06 17:07:36

标签: ruby-on-rails-3 passenger dreamhost

我一直在争取在共享的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版本可能是问题(我在rvm本地使用1.9.3)

ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]

我应该减少我的损失并使用fastCGI安装它还是看起来可以修复?

1 个答案:

答案 0 :(得分:1)

您的主机正在运行Ruby 1.8。该哈希语法({key: value})仅在Ruby 1.9中可用。您必须选择不同的gem,选择不同的主机,或者分叉gem并修改它以使用旧的哈希语法({:key => value})。最好的办法是找到一个运行现代版Ruby的主机,因为在不久的将来,Rails将不支持1.8.x.