2014-01-23 199 views
0

在清除我的宝石与rvm gemset empty后,我重新安装rails(3.2.13),然后删除我的Gemfile.lock并运行bundle install。 Bundler没有安装宝石,它只是说它正在“使用”它们,就好像它们已经安装一样。所以当我尝试运行应用程序时,我被告知“无法在任何源代码中找到[gem namne](Bundler :: GemNotFound)”。宝石未安装捆绑安装

编辑:我正在运行sudo bundle install,因为其中一个宝石是从本地源安装的。使用sudo时,未安装宝石。当运行bundle install时,Bundler会尝试安装缺失的宝石,但它不能安装来自本地源的bootstrap-sass宝石。

的Gemfile

source "https://rubygems.org" 

gem "rails", "~> 3.2.13" 
gem "mysql2", "~> 0.3.13" 
gem "json", "~> 1.8.0" 

group :assets do 
    gem "guard-rails-assets", "~> 0.1.3" 
    gem "sass-rails", "~> 3.2.6" 
    gem "coffee-rails", "~> 3.2.2" 
    gem "uglifier", "~> 1.0.3" 
end 

gem "jquery-rails", "~> 3.0.4" 
gem "simple_form", "~> 2.1.0" 
gem "bootstrap-sass", :path => "gems/bootstrap-sass-c0e12a90ba3e" 
gem "client_side_validations", "~> 3.2.6" 
gem "client_side_validations-simple_form", "~> 2.1.0" 
gem "therubyracer", :platform => :ruby 
gem "require_relative", "~> 1.0.3" 
gem "icalendar", "~> 1.4.3" 
gem "whenever", "~> 0.8.4", :require => false 
gem "jquery-cookie-rails", "~> 1.3.1" 
gem "hominid", "~> 3.0.5" 

gem list

*** LOCAL GEMS *** 

actionmailer (3.2.13) 
actionpack (3.2.13) 
activemodel (3.2.13) 
activerecord (3.2.13) 
activeresource (3.2.13) 
activesupport (3.2.13) 
arel (3.0.3) 
builder (3.0.4) 
bundler (1.5.2) 
bundler-unload (1.0.2) 
daemon_controller (1.1.8) 
erubis (2.7.0) 
executable-hooks (1.3.1) 
gem-wrappers (1.2.4) 
hike (1.2.3) 
i18n (0.6.1) 
journey (1.0.4) 
json (1.8.1) 
mail (2.5.4) 
mime-types (1.25.1) 
multi_json (1.8.4) 
passenger (4.0.35) 
polyglot (0.3.3) 
rack (1.4.5) 
rack-cache (1.2) 
rack-ssl (1.3.3) 
rack-test (0.6.2) 
rails (3.2.13) 
railties (3.2.13) 
rake (10.1.1) 
rdoc (3.12.2) 
rubygems-bundler (1.4.2) 
rvm (1.11.3.8) 
sprockets (2.2.2) 
thor (0.18.1) 
tilt (1.4.1) 
treetop (1.4.15) 
tzinfo (0.3.38) 

为什么不bundle安装在我的Gemfile宝石?

+0

您正在使用哪个'bundle'?我的意思是,'哪个包'返回? –

+0

@MarekLipka - '/ home/ubuntu/.rvm/gems/ruby​​-1.8.7-p374 @ global/bin/bundle' –

回答

2

当你运行你可能使用捆绑的不同实例sudo bundle install(或者你在RVM的另一个实例全球安装系统,或者你仅仅使用系统默认的红宝石)

结果,它会为该系统的ruby安装宝石。如果以后打开服务器而不使用sudo,它会在本地RVM中寻找宝石,但没有安装 正确的方法是使用``bundle install进行安装。你应该做的是修复bootstrap-sass的路径错误。顺便说一下,这可能是因为同样的问题而发生的 您的系统可能有一个路径"gems/bootstrap-sass-c0e12a90ba3e"而不是您本地的RVM

+0

有道理,谢谢。 –

1

我想你应该把你的版本bootstrap-sass gem放在没有root权限的目录下。

相关问题