捆绑安装问题

时间:2011-08-31 12:19:20

标签: ruby-on-rails gemfile

好的,无论何时我运行“捆绑安装”,我都会得到这个

Bundler could not find compatible versions for gem "railties":
  In Gemfile:
    sass-rails (~> 3.1.0.rc8) depends on
      railties (~> 3.1.0)

    railties (3.1.0.rc8)

现在在我的宝石文件中我有这个:

source 'http://rubygems.org'

gem 'rails', '3.1.0.rc8'

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

gem 'sqlite3'

gem 'json'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails', "  ~> 3.1.0.rc8"
#added by me
  gem 'railties', " ~> 3.1.0.rc8"
#end
  gem 'coffee-rails', "~> 3.1.0.rc"
  gem 'uglifier'
end

gem 'jquery-rails'

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

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug'

我正在使用ubuntu而且我是ruby的新手,我正在尝试运行一个简单的应用程序。

有任何帮助吗? THX!

1 个答案:

答案 0 :(得分:6)

由于Rails 3.1已于今天发布,您必须将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'

gem 'json'

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

由于此gem包含在rails中,因此您不需要railties行。 然后,运行bundle install。这应该可以解决问题。