2012-05-10 56 views
0

我在使用我的rails應用程序時查看主頁時遇到問題。當我運行它,我得到以下錯誤:我的Ruby Gemfile存在問題

找不到寶石「軌= 3.1.0 x86的ming32任何在Gemfile中列出的寶石來源

我的寶石文件的內容如下: :

source 'http://rubygems.org' 

gem 'rails', '3.1.0' 

# Bundle edge Rails instead: 
# gem 'rails',  :git => 'git://github.com/rails/rails.git' 

gem 'sqlite3' 


# 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' 

# Use unicorn as the web server 
# gem 'unicorn' 

# Deploy with Capistrano 
# gem 'capistrano' 

# To use debugger 
# gem 'ruby-debug19', :require => 'ruby-debug' 

group :test do 
    # Pretty printed test output 
    gem 'turn', :require => false 
end 
+1

你有沒有運行'束install'? – nmott

回答

0

When I run it

請問你是如何運行的呢?

取而代之的是,您正在運行bundle exec rails g model Somthing。或者你正在運行的任何命令。

bundle list也說什麼?你能看到這個命令給你的列表中的所有軌道寶石嗎?

0
rails (= 3.1.0) ruby depends on 
    railties (3.1.0) 

因此,它不會捆綁,除非你有源提供所需的依賴關係。

我建議安裝rails 3.2.3並使用它。

gem install rails #will install the newest rails 
中的Gemfile

gem 'rails', '3.2.3' 

然後運行

$:.bundle update.