Rails 无法在任何源中找到 devise-1.4.6(尝试运行 rspec 测试)
我尝试运行规格测试并得到
bundle exec rake spec
Could not find selenium-webdriver-2.6.0 in any of the sources
所以我捆绑并得到:
捆绑 正在获取 http://rubygems.org/ 的源索引 在任何源中都找不到 devise-1.4.6
所以我尝试安装 devise 1.4.6 但我得到了
gem install devise -v1.4.6
ERROR: Could not find a valid gem 'devise' (= 1.4.6) in any repository
ERROR: Possible alternatives: devise
这真的很奇怪,因为我的 Gem 文件本身只有“Devise”(没有版本号)。
我的 Gem 文件的其余部分如下。
我还做了 rake test:prepare 并且数据库和表存在于测试中。
cat Gemfile
source 'http://rubygems.org'
gem 'rake', '0.9.2'
gem 'rails', '3.1.0'
gem 'haml'
gem 'simple_form'
gem 'devise'
gem 'mysql2'
gem 'therubyracer'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end
gem 'jquery-rails'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
group :test, :development do
# gem 'cucumber-rails', '0.5.0'
gem 'capybara'#, '1.0.0.beta1'
gem 'database_cleaner'#, '0.6.7'
gem "rspec-rails", "~> 2.6"
# gem 'forgery', '0.3.8'
gem "forgery"
gem 'factory_girl'#, '1.3.3'
gem 'factory_girl_rails'#, '1.0.1'
gem 'shoulda'#, '2.11.3'
gem 'rcov'
gem 'turn', :require => false # Pretty printed test output
end
I try to run spec tests and I get
bundle exec rake spec
Could not find selenium-webdriver-2.6.0 in any of the sources
So I bundle and I get:
bundle
Fetching source index for http://rubygems.org/
Could not find devise-1.4.6 in any of the sources
So I try to install devise 1.4.6 but I get
gem install devise -v1.4.6
ERROR: Could not find a valid gem 'devise' (= 1.4.6) in any repository
ERROR: Possible alternatives: devise
Which is really strange as my Gem file itself just has 'Devise' (no version number).
The rest of my Gem file is below.
I have also done rake test:prepare and the database and table exists in test.
cat Gemfile
source 'http://rubygems.org'
gem 'rake', '0.9.2'
gem 'rails', '3.1.0'
gem 'haml'
gem 'simple_form'
gem 'devise'
gem 'mysql2'
gem 'therubyracer'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end
gem 'jquery-rails'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
group :test, :development do
# gem 'cucumber-rails', '0.5.0'
gem 'capybara'#, '1.0.0.beta1'
gem 'database_cleaner'#, '0.6.7'
gem "rspec-rails", "~> 2.6"
# gem 'forgery', '0.3.8'
gem "forgery"
gem 'factory_girl'#, '1.3.3'
gem 'factory_girl_rails'#, '1.0.1'
gem 'shoulda'#, '2.11.3'
gem 'rcov'
gem 'turn', :require => false # Pretty printed test output
end
是的,它已被撤回,请参阅此处:
Yes, it has been yanked, see here: