我是RoR的新手。我必須打開一個已經創建的項目。該文件夾不包含bin文件夾,我將bin文件夾的內容從其他某個項目(運行後我通過this創建)複製到當前。現在,當我移動到path/to/bin/
並給出rails server
時,它給出,在任何來源中找不到somegem name
。嘗試捆綁安裝。捆綁安裝給出錯誤找不到在任何來源的email_spec-1.0.0
如果我使用gem install gemname -v=versionnumber
安裝gem,它會正確安裝。但是,如果我給出命令bundle install
它給人的錯誤
could not find email_spec-1.0.0 in any of the sources
我知道複製文件是不是做的正確方法。但我怎樣才能嘗試運行該項目?或者我們如何特別解決這個錯誤。
。我還發現特定的版本被抽出,我從外部從RubyGems.org下載email_spec 1.0.0。我現在該怎麼辦?
編輯:: 這是我的Gemfile:
source 'http://rubygems.org'
gem 'rails', '3.0.3'
gem 'mysql2'
gem 'haml-rails'
gem 'jquery-rails'
gem 'devise'
gem 'cancan'
gem 'paperclip'
gem 'recurly'
gem 'hoptoad_notifier'
gem 'whenever', :require => false
gem "friendly_id", "~> 3.1"
gem "will_paginate"
gem "fastercsv"
gem 'meta-tags', :require => 'meta_tags'
gem 'acts-as-taggable-on'
gem 'thin'
gem 'faye', '0.5.5'
gem 'rack-ssl', :require => 'rack/ssl'
gem 'localized_country_select'
group :development, :test do
gem 'ruby-debug'
gem 'rspec-rails'
gem 'cucumber'
gem 'cucumber-rails'
gem 'capybara'
gem 'database_cleaner'
gem 'cucumber-rails'
gem 'cucumber'
gem 'rspec-rails'
gem 'spork'
gem 'launchy'
gem 'factory_girl_rails'
gem 'hpricot'
gem 'ruby_parser'
gem 'rest-client'
gem 'email_spec'
end
編輯:
按評論,我刪除了Gemfile.lock的,並試圖運行包重新安裝。現在的問題是,它提供了以下錯誤
An error occured while installing linecache (0.46) and bundler can not continue. Make sure that gem install linecache -v '0.46' succeeds
我試圖給命令創業板安裝linecache -v = 0.46
,並給出了一些錯誤Gemfiles會保持安裝在C:\ Ruby193 \ lib \ ruby \ gems \ 1.9.1 \ gems \ linecache-0.46進行檢查。 結果記錄到C:\ Ruby193 \ LIB \紅寶石\寶石\ 1.9.1 \寶石\ linecache-0.46 \分機\ gem_make.out
這個特殊的文件有以下內容:
C:/Ruby193/bin/ruby.exe extconf.rb
Can't handle 1.9.x yet
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby193/bin/ruby
又該我現在做的?
我這樣做,它給出了同樣的錯誤.. – inquisitive 2014-10-06 12:08:56
@學習者,分享你的Gemfile – Acacia 2014-10-06 12:15:57
我恢復了gemfile.lock再次被刪除和繼續。現在它出現這個錯誤:安裝linecache(0.46)時發生錯誤,bundler無法繼續。確保'gem install linecache -v'0.46'成功。我做了同樣的事情,並再次進行捆綁安裝,但沒有用。 – inquisitive 2014-10-06 12:24:59