[英]Gems not installed by bundle install
在清除了rvm gemset empty
gem之后,我重新安裝了rails(3.2.13),然后刪除了Gemfile.lock
並運行bundle install
。 Bundler沒有安裝gem,它只是說正在“使用”它們,就好像它們已經被安裝一樣。 因此,當我嘗試運行該應用程序時,系統會告訴我“在任何來源(Bundler :: GemNotFound)中都找不到[gem namne]”。
編輯:我正在運行sudo bundle install
因為其中一個gem是從本地源安裝的。 使用sudo
,未安裝gem。 僅在運行bundle install
,Bundler會嘗試安裝缺少的gem,但無法安裝來自本地來源的bootstrap-sass
gem。
寶石文件
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中?
當您運行sudo bundle install
您可能正在使用捆綁程序的其他實例(您在系統中全局安裝了另一個RVM實例,或者僅使用了默認的系統ruby)
結果,它將為該系統的ruby安裝寶石。 如果您稍后在不使用sudo
情況下打開服務器,它將在您的本地RVM中查找gems,而本地RVM中沒有``bundle install
僅``bundle install
是正確的``bundle install
方式``bundle install
。 相反,您應該做的是從bootstrap-sass修復該路徑錯誤。 順便說一句,可能是由於相同的問題而發生的。您的系統紅寶石中可能有一個路徑"gems/bootstrap-sass-c0e12a90ba3e"
,但在本地RVM上卻沒有
我猜您應該將您的bootstrap-sass
gem版本放在沒有root特權的目錄中。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.