在Windows 7上安装Gem therubyracer

时间:2014-11-04 11:25:24

标签: ruby-on-rails ruby ruby-on-rails-3 therubyracer

今天我们正在尝试安装旧项目"由 rails3 "开发在我的Pc上输入命令后

bundle install 

rails s

它给了我错误

Please install gem 'therubyracer' to use Less.

然后我通过执行此步骤安装了 Gem therubyracer

首先激活我的代码编码

C:\>chcp 1252
Active code page: 1252

然后从此页面下载了Windows的Gem文件 https://github.com/hiranpeiris/therubyracer_for_windows

并输入命令

C:\>cd therubyracer_for_windows-master

C:\therubyracer_for_windows-master>gem install "therubyracer-0.11.0beta1-x86-min
gw32.gem"
Successfully installed therubyracer-0.11.0beta1-x86-mingw32
Parsing documentation for therubyracer-0.11.0beta1-x86-mingw32
Done installing documentation for therubyracer after 3 seconds
1 gem installed

C:\therubyracer_for_windows-master>cd..

C:\>cd sites

C:\Sites>cd siteFolder

C:\Sites>cd siteFolder> bundle install

C:\Sites\siteFolder>rails s
然后我发现自己得到了同样的错误! 为什么? 宝石现在安装,为什么我得到相同的错误???

[WARNING] Please install gem 'therubyracer' to use Less.
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.5.0/lib/less/java_sc
ript/v8_context.rb:2:in `require': cannot load such file -- v8 (LoadError)
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.5.0/lib
/less/java_script/v8_context.rb:2:in `<top (required)>'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.5.0/lib
/less/java_script.rb:9:in `require'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.5.0/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.5.0/lib
/less/java_script.rb:17:in `context_wrapper'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.5.0/lib
/less/loader.rb:13:in `initialize'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.5.0/lib
/less.rb:14:in `new'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.5.0/lib
/less.rb:14:in `<module:Less>'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.5.0/lib
/less.rb:9:in `<top (required)>'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-rails-2.5
.0/lib/less/rails.rb:6:in `require'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-rails-2.5
.0/lib/less/rails.rb:6:in `<top (required)>'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-rails-2.5
.0/lib/less-rails.rb:1:in `require'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-rails-2.5
.0/lib/less-rails.rb:1:in `<top (required)>'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/
lib/bundler/runtime.rb:76:in `require'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/
lib/bundler/runtime.rb:76:in `block (2 levels) in require'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/
lib/bundler/runtime.rb:72:in `each'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/
lib/bundler/runtime.rb:72:in `block in require'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/
lib/bundler/runtime.rb:61:in `each'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/
lib/bundler/runtime.rb:61:in `require'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/
lib/bundler.rb:132:in `require'
        from C:/Sites/siteFolder/config/application.rb:13:in `<top (required)>'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1
3/lib/rails/commands.rb:53:in `require'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1
3/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.1
3/lib/rails/commands.rb:50:in `tap'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.1
3/lib/rails/commands.rb:50:in `<top (required)>'
        from script/rails:6:in `require'
        from script/rails:6:in `<main>'

C:\Sites\siteFolder>

0 个答案:

没有答案