Ruby on rails Mercury:SyntaxError:无法从构造函数返回值

Ruby on rails Mercury:SyntaxError:无法从构造函数返回值,ruby-on-rails,Ruby On Rails,正在重新安装rails 3.2.8,并在添加以下内容后编译时出错: 我已经使用Rails 3.2.3成功地安装了Mercury,但还没有弄清楚为什么这不起作用 有什么想法吗 source 'https://rubygems.org' gem 'rails', '3.2.8' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' gem 'mysql2' gem 'b

正在重新安装rails 3.2.8,并在添加以下内容后编译时出错:

我已经使用Rails 3.2.3成功地安装了Mercury,但还没有弄清楚为什么这不起作用

有什么想法吗

source 'https://rubygems.org'

gem 'rails', '3.2.8'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'mysql2'
gem 'bootstrap-sass'
gem 'simple_form'
gem 'json'
gem 'ckeditor'
gem 'mercury-rails', :git => 'https://github.com/jejacks0n/mercury.git'


gem 'jquery-rails'
# gem 'jquery-ui-rails'

gem "paperclip", "~> 2.7"

# To use ActiveModel has_secure_password
gem 'bcrypt-ruby', '~> 3.0.0'

# 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'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
    gem 'therubyracer', '0.10.2', :platforms => :ruby
    gem 'libv8', '~> 3.3.10'
    gem 'execjs'
  gem 'uglifier', '>= 1.0.3'
end

我想你需要锁定coffeescript 1.4.0


这解决了我的问题。

以下是您实际需要在文件中键入的内容:

gem 'coffee-script-source', '1.4.0'

显然,有一个修正,它在中,但在rubygems上还没有。如果不想降级coffee脚本,只需在文件中指定存储库:

# Gemfile
# ...
gem 'mercury-rails', git: 'git://github.com/jejacks0n/mercury'

然后运行
bundle update mercury rails
。这为我解决了这个问题,而无需降级咖啡脚本。

fyi:谢谢,我的Google Fu必须关闭;我什么都找不到。。。谢谢
# Gemfile
# ...
gem 'mercury-rails', git: 'git://github.com/jejacks0n/mercury'