- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我一直在努力让 twitter-bootstrap-rails gem 在我的 Windows 机器上工作,但在尝试安装“therubyracer” gem 时遇到了错误,该 gem 是旧版本的 less gem 的依赖项。
我认为升级到不依赖于 therubyracer 的 2.2.1 版本,但尽管如此,它似乎认为我仍然需要安装 therubyracer。这是我尝试启动 Rails 服务器“rails s”时得到的错误输出。
$ rails s
[WARNING] Please install gem 'therubyracer' to use Less.
c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- v8 (LoadError)
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less/java_script/v8_context.rb:2:in `<top (required)>'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less/java_script.rb:9:in `default_context_wrapper'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less/java_script.rb:17:in `context_wrapper'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less/loader.rb:10:in `initialize'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less.rb:14:in `new'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less.rb:14:in `<module:Less>'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less.rb:9:in `<top (required)>'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-rails-2.2.3/lib/less/rails.rb:6:in `<top (required)>'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-rails-2.2.3/lib/less-rails.rb:1:in `<top (required)>'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/twitter-bootstrap-rails-2.1.2/lib/twitter-bootstrap-rails.rb:9:in `<top (required)>'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in `require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in `each'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in `block in require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in `each'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in `require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler.rb:122:in `require'
from C:/Sites/alliance/config/application.rb:9:in `<top (required)>'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:53:in `require'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:53:in `block in <top (required)>'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:50:in `tap'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Gemfile
和
Gemfile.lock
文件。谁能帮我弄清楚如何告诉我的应用程序不需要安装“therubyracer”?
Gemfile
----
source 'https://rubygems.org'
gem 'rails', '~> 3.2.3'
gem 'jquery-rails'
gem 'haml-rails'
gem 'simple_form'
gem 'decent_exposure'
gem "devise", :git => "git://github.com/plataformatec/devise.git"
gem 'cancan'
gem 'prawn'
gem 'ransack'
gem 'eventmachine', '= 1.0.0.rc.4'
gem 'therubyracer', :platforms => :ruby
group :assets do
gem 'execjs'
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'bootstrap-sass'
gem 'twitter-bootstrap-rails'
gem 'uglifier', '>= 1.0.3'
end
group :development, :test do
gem 'debugger'
gem 'rails_best_practices'
gem 'factory_girl_rails', '~> 2.0'
gem 'sqlite3'
gem 'simplecov', require: false
gem 'rspec-rails'
gem 'rspec-instafail'
gem 'rspec-steps'
gem 'factory_girl_rails', '~> 2.0'
gem "capybara"
gem "selenium-webdriver"
gem 'launchy' # provides save_and_open_page
gem 'fuubar'
gem 'database_cleaner'
gem 'rantly'
gem 'heroku'
gem 'rb-fsevent' #, :require => false if RUBY_PLATFORM =~ /darwin/i
gem 'guard-rspec'
end
group :production do
gem 'mysql2'
gem 'thin'
gem 'pg'
end
Gemfile.lock
----
GIT
remote: git://github.com/plataformatec/devise.git
revision: f7dd59839cd39ed3c57948d37e8a95c697c14647
specs:
devise (2.1.2)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
railties (~> 3.1)
warden (~> 1.2.1)
GEM
remote: https://rubygems.org/
specs:
Ascii85 (1.0.1)
actionmailer (3.2.8)
actionpack (= 3.2.8)
mail (~> 2.4.4)
actionpack (3.2.8)
activemodel (= 3.2.8)
activesupport (= 3.2.8)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.1.3)
activemodel (3.2.8)
activesupport (= 3.2.8)
builder (~> 3.0.0)
activerecord (3.2.8)
activemodel (= 3.2.8)
activesupport (= 3.2.8)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.8)
activemodel (= 3.2.8)
activesupport (= 3.2.8)
activesupport (3.2.8)
i18n (~> 0.6)
multi_json (~> 1.0)
addressable (2.3.2)
arel (3.0.2)
awesome_print (1.0.2)
bcrypt-ruby (3.0.1-x86-mingw32)
bootstrap-sass (2.1.0.0)
builder (3.0.1)
cancan (1.6.8)
capybara (1.1.2)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
childprocess (0.3.5)
ffi (~> 1.0, >= 1.0.6)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.3.3)
colored (1.2)
columnize (0.3.6)
commonjs (0.2.6)
daemons (1.1.9)
database_cleaner (0.8.0)
debugger (1.2.0)
columnize (>= 0.3.1)
debugger-linecache (~> 1.1.1)
debugger-ruby_core_source (~> 1.1.3)
debugger-linecache (1.1.2)
debugger-ruby_core_source (>= 1.1.1)
debugger-ruby_core_source (1.1.3)
decent_exposure (1.0.2)
diff-lcs (1.1.3)
erubis (2.7.0)
eventmachine (1.0.0.rc.4-x86-mingw32)
excon (0.16.2)
execjs (1.4.0)
multi_json (~> 1.0)
factory_girl (3.0.0)
activesupport (>= 3.0.0)
factory_girl_rails (2.0.0)
factory_girl (~> 3.0.0)
railties (>= 3.0.0)
ffi (1.1.5)
fuubar (1.0.0)
rspec (~> 2.0)
rspec-instafail (~> 0.2.0)
ruby-progressbar (~> 0.0.10)
guard (1.3.2)
listen (>= 0.4.2)
thor (>= 0.14.6)
guard-rspec (1.2.1)
guard (>= 1.1)
haml (3.1.7)
haml-rails (0.3.4)
actionpack (~> 3.0)
activesupport (~> 3.0)
haml (~> 3.0)
railties (~> 3.0)
hashery (2.0.1)
heroku (2.31.2)
heroku-api (~> 0.3.4)
launchy (>= 0.3.2)
netrc (~> 0.7.7)
rest-client (~> 1.6.1)
rubyzip
heroku-api (0.3.4)
excon (~> 0.16.1)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (2.1.2)
railties (>= 3.1.0, < 5.0)
thor (~> 0.14)
json (1.7.5)
launchy (2.1.2)
addressable (~> 2.3)
less (2.2.2)
commonjs (~> 0.2.6)
less-rails (2.2.3)
actionpack (>= 3.1)
less (~> 2.2.0)
libwebsocket (0.1.5)
addressable
listen (0.5.0)
mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.19)
multi_json (1.3.6)
mysql2 (0.3.11-x86-mingw32)
netrc (0.7.7)
nokogiri (1.5.5-x86-mingw32)
orm_adapter (0.4.0)
pdf-reader (1.2.0)
Ascii85 (~> 1.0.0)
hashery (~> 2.0)
ruby-rc4
pg (0.14.1-x86-mingw32)
polyamorous (0.5.0)
activerecord (~> 3.0)
polyglot (0.3.3)
prawn (0.12.0)
pdf-reader (>= 0.9.0)
ttfunk (~> 1.0.2)
progressbar (0.11.0)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.2.8)
actionmailer (= 3.2.8)
actionpack (= 3.2.8)
activerecord (= 3.2.8)
activeresource (= 3.2.8)
activesupport (= 3.2.8)
bundler (~> 1.0)
railties (= 3.2.8)
rails_best_practices (1.10.1)
activesupport
awesome_print
colored
erubis
i18n
progressbar
sexp_processor
railties (3.2.8)
actionpack (= 3.2.8)
activesupport (= 3.2.8)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (0.9.2.2)
ransack (0.7.0)
actionpack (~> 3.0)
activerecord (~> 3.0)
polyamorous (~> 0.5.0)
rantly (0.3.1)
rb-fsevent (0.9.1)
rdoc (3.12)
json (~> 1.4)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.11.0)
rspec-core (~> 2.11.0)
rspec-expectations (~> 2.11.0)
rspec-mocks (~> 2.11.0)
rspec-core (2.11.1)
rspec-expectations (2.11.3)
diff-lcs (~> 1.1.3)
rspec-instafail (0.2.4)
rspec-mocks (2.11.2)
rspec-rails (2.11.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec (~> 2.11.0)
rspec-steps (0.0.8)
rspec (>= 2.6)
ruby-progressbar (0.0.10)
ruby-rc4 (0.1.5)
rubyzip (0.9.9)
sass (3.2.1)
sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
selenium-webdriver (2.25.0)
childprocess (>= 0.2.5)
libwebsocket (~> 0.1.3)
multi_json (~> 1.0)
rubyzip
sexp_processor (4.0.1)
simple_form (2.0.2)
actionpack (~> 3.0)
activemodel (~> 3.0)
simplecov (0.6.4)
multi_json (~> 1.0)
simplecov-html (~> 0.5.3)
simplecov-html (0.5.3)
sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6-x86-mingw32)
thin (1.4.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.16.0)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
ttfunk (1.0.3)
twitter-bootstrap-rails (2.1.2)
actionpack (>= 3.1)
less-rails (~> 2.2.3)
railties (>= 3.1)
tzinfo (0.3.33)
uglifier (1.3.0)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
warden (1.2.1)
rack (>= 1.0)
xpath (0.1.4)
nokogiri (~> 1.3)
PLATFORMS
x86-mingw32
DEPENDENCIES
bootstrap-sass
cancan
capybara
coffee-rails (~> 3.2.1)
database_cleaner
debugger
decent_exposure
devise!
eventmachine (= 1.0.0.rc.4)
execjs
factory_girl_rails (~> 2.0)
fuubar
guard-rspec
haml-rails
heroku
jquery-rails
launchy
mysql2
pg
prawn
rails (~> 3.2.3)
rails_best_practices
ransack
rantly
rb-fsevent
rspec-instafail
rspec-rails
rspec-steps
sass-rails (~> 3.2.3)
selenium-webdriver
simple_form
simplecov
sqlite3
therubyracer
thin
twitter-bootstrap-rails
uglifier (>= 1.0.3)
最佳答案
我强烈建议您关注 Daniel Kehoe 的优秀作品:
https://github.com/RailsApps/rails3-bootstrap-devise-cancan如果你还没有。
关于我在你的 Gemfile 中看到的唯一可疑的东西是里面有“rubyracer”。为什么会在那里?尝试删除它。别忘了bundle install
当然,无论何时进行任何更改。
关于ruby-on-rails - 使用 less (2.2.1) 会引发需要 therubyracer 的错误(无法在 Windows 上安装 therubyracer),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12311306/
我一直在尝试安装 therubyracer 并尝试了几乎所有我在 stackoverflow 上能找到的东西,但它似乎仍然给我同样的错误。我也是 ruby on rails 的新手,所以我无法准确
我一直在努力让 twitter-bootstrap-rails gem 在我的 Windows 机器上工作,但在尝试安装“therubyracer” gem 时遇到了错误,该 gem 是旧版本的 le
我正在尝试在 Debian 6 上执行 gem install therubyracer。我在 1.9.3 上使用 rbenv。当我最初这样做时,它提示 libv8,所以我做了一个 gem insta
我最近从 github 上 fork 了一个存储库,但是,当我尝试运行“bundle install”时,我得到以下错误输出: Robert-Quinns-MacBook-Pro:~ robertqu
调用 V8::Context#load 时,therubyracer 提示 Unexpected token [ at /home/dm/contra/app/assets/javascripts/l
一旦我将一个方法存储在 V8::Context 中,该方法的所有后续实例都以任何名称存储在任何上下文中,其行为与初始实例一样(即,就好像原始实例已再次存储一样)。 我尝试通过以下方式隔离/演示问题:
我在 Windows Server 2012 R2 上安装 therubyracer 时遇到问题。 首先,我尝试使用 gem install therubyracer -v '0.12.3' 给出了这
我在捆绑安装更新时收到错误消息。这是我的 gem 文件: source 'https://rubygems.org' gem 'rails', '3.2.1' # Bundle edge Rails
我制作了一个 Rails 3.1 PoC 应用程序,它也通过改编 railstutorial.org 书中的示例使用 haml,并且在本地一切正常。 但是当我尝试推送到 heroku 时, theru
我单独安装了 libv8 gem,但当我尝试安装 therubyracer gem 时,出现以下错误: Building native extensions. This could take a w
我正在关注 ruby on rails getting started guide在新安装的 Ubuntu 12.10 上。我准备运行 rake db:create 但出现以下错误: rake 中止了
我正在运行 Centos 6.5、apache2 和 ruby 2.1.2p95 并尝试为我的 sinatra 应用程序启动 Puma 服务器。它仍然无法提供极长的输出,但看起来真正的错误是: /
我已经安装了 RVM,然后安装了 Jruby,这是我在输入时得到的版本:jruby -v: jruby 1.6.5.1 (ruby-1.8.7-p330) (2011-12-27 1bf37c2) (
我无法在 Ubuntu 12.04 中安装 therubyracer-heroku。我在互联网上的一两个其他地方看到过这个错误,但没有解决方案。我运行的命令是: sudo gem install th
如何更换 therubyracer gem ?我真的被困住了。 我们一直在使用therubyracer我们的 Rails Assets 管道的 gem。但是,它使用的依赖项已过期并具有安全漏洞。最新版
我已经在 Windows 上平静地开发了几周,没有添加任何 gem,今天我决定进行 bundle 更新,但我无法完成这个名为 therubyracer 的 gem。我已经安装了 devkit,并且它正
我有一个简单的 Ember 应用程序,用于从用户收集有关气井体积的数据。它是一个与服务器同步的移动应用程序,所以我尝试使用 CouchDB 来处理数据。客户端需要 SQL 存储中的数据,因此我尝试通过
我是 ruby 新手。当我尝试“gem install therubyracer”时,它显示以下错误: C:\Users\Desktop>gem install therubyracer Tempor
是否有安装 therubyracer gem 的方法,即需要在 Windows 中运行 RoR 项目? 我已经尝试过正常的方式,但它不会然后我尝试安装 cygwin 然后尝试安装 gem,但仍然没有运
我有这个设置: OSX El Capitan 10.11.1 Ruby 2.0.0p247 (Rbenv)(我没有 RVM) rails 4.1.14.1 我跑 bundle install一切看起来
我是一名优秀的程序员,十分优秀!