我是Ruby on Rails的新手。所以,我之前遇到过这个错误,我重新安装了rails和ruby并再次安装它们,但我仍然得到它。 错误是:
/home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'uglifier'. (Bundler::GemRequireError)
from /home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from /home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from /home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from /home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from /home/X/.rvm/gems/ruby-2.2.1/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from /home/X/Documents/Appw/config/application.rb:7:in `<top (required)>'
from /home/X/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:78:in `require'
from /home/X/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:78:in `block in server'
from /home/X/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `tap'
from /home/X/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `server'
from /home/X/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/X/.rvm/gems/ruby-2.2.1/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
from /home/X/Documents/Appw/bin/rails:9:in `require'
from /home/X/Documents/Appw/bin/rails:9:in `<top (required)>'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/lib/spring/client/rails.rb:28:in `load'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/lib/spring/client/rails.rb:28:in `call'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/lib/spring/client/command.rb:7:in `call'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/lib/spring/client.rb:28:in `run'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/bin/spring:51:in `<top (required)>'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/lib/spring/binstub.rb:11:in `load'
from /home/X/.rvm/gems/ruby-2.2.1/gems/spring-1.6.1/lib/spring/binstub.rb:11:in `<top (required)>'
from /home/X/Documents/Appw/bin/spring:13:in `require'
from /home/X/Documents/Appw/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
我尝试更新uglifier gem,但什么也没发生。
答案 0 :(得分:1)
看起来你没有安装nodejs
sudo apt-get install nodejs
应该工作!!!
答案 1 :(得分:1)
问题是我没有安装nodejs。安装完成后,一切顺利。
答案 2 :(得分:0)
你是什么gemfile / gem list?
实际安装meteor并不算作安装了nodejs。 uglifier包需要nodejs,这很简单:yum install nodejs
解决了这个问题。