关于启动项目的问题
启动项目报错: Could not find gem 'sass-rails (~> 4.0.3) ruby' in any of the gem sources listed in your Gemfile or installed on this machine. Run `bundle install` to install missing gems. 是什么原因。
启动项目报错: Could not find gem 'sass-rails (~> 4.0.3) ruby' in any of the gem sources listed in your Gemfile or installed on this machine. Run `bundle install` to install missing gems. 是什么原因。
2015-04-26
vagrant@vagrant-ubuntu-trusty-64:/vagrant/yeepay$ rails s
/home/vagrant/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/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/vagrant/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /home/vagrant/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from /home/vagrant/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from /home/vagrant/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from /home/vagrant/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from /home/vagrant/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from /vagrant/yeepay/config/application.rb:7:in `<top (required)>'
from /home/vagrant/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.2/lib/rails/commands/commands_tasks.rb:79:in `require'
from /home/vagrant/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.2/lib/rails/commands/commands_tasks.rb:79:in `block in server'
from /home/vagrant/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.2/lib/rails/commands/commands_tasks.rb:76:in `tap'
from /home/vagrant/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.2/lib/rails/commands/commands_tasks.rb:76:in `server'
from /home/vagrant/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.2/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /home/vagrant/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.1.2/lib/rails/commands.rb:17:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
vagrant@vagrant-ubuntu-trusty-64:/vagrant/yeepay$ sudo apt-get install -y nodejs
进入创建项目的Gemfile文件,修改你的 Gemfile 将 http://rubygems.org 改为 http://ruby.taobao.org/。运行bundle install,加载好后,运行bundle --localhost,在运行项目应该就没问题了,今天刚搞好。
举报