在全新安装rails 3.2.8时,在添加Mercury后编译时出现错误
SyntaxError: cannot return a value from a constructor: "this.element" in class Button
(in /home/*********/**************/vendor/bundle/ruby/1.8/bundler/gems/mercury-0c048033cd79/app/assets/javascripts/mercury/toolbar.button.js.coffee)我已经使用Rails 3.2.3成功地安装了水星,但是还不能弄清楚为什么它不能工作。
有什么想法吗?
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发布于 2013-03-01 03:12:47
发布于 2013-04-10 04:36:29
显然,有一个修复,它在github repo中,但还没有在rubygem上。如果你不想降级咖啡脚本,只需在Gemfile中指定存储库:
# Gemfile
# ...
gem 'mercury-rails', git: 'git://github.com/jejacks0n/mercury'然后运行bundle update mercury-rails。这为我解决了这个问题,而不需要降级咖啡脚本。
发布于 2013-03-15 04:54:32
这是你实际需要在你的gemfile中输入的内容:
gem 'coffee-script-source', '1.4.0'https://stackoverflow.com/questions/15119504
复制相似问题