我试图使用Twitter的引导护栏宝石在我的第一个Rails项目,在Windows 7机器上运行
ruby 1.9.3p125 (2012-02-16) [i386-mingw32]
Rails 3.2.1
twitter-bootstrap-rails 2.1.1
当我运行rails g bootstrap:install
我得到如下:
[WARNING] Please install gem 'therubyracer' to use Less.
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runtime.rb:74:in `require': cannot load such file -- twitter/bootstrap/rails (LoadError)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-.1.5/lib/bundler/runtime.rb:74:in 'rescue in block in require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-.1.5/lib/bundler/runtime.rb:62:in 'block in require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-.1.5/lib/bundler/runtime.rb:55:in 'each'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-.1.5/lib/bundler/runtime.rb:55:in 'require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-.1.5/lib/bundler.rb:119:in `require'
from H:/Dev/sugarcane/config/application.rb:7:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:24:in `require'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:24:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
这里是我的Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.1'
gem 'pg'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
我试过,包括gem therubyracer
在我的Gemfile,但我得到有关libv8宝石,这编译错误是不是适用于Windows 。 我也试过gem therubyracer, :platform => :ruby
,但仍捆扎机试图上安装therubyracer bundle install
。 我也尝试安装的Node.js以及包括gem execjs
,但无济于事。
每一个解决方案,我遇到似乎并没有帮助的。 我想少用,而不是在这个项目上的静态CSS,这样的解决方案,让我使用Rails较少使用Windows计算机上的将是最有帮助的。