捆绑安装问题

ama*_*man 1 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)
Run Code Online (Sandbox Code Playgroud)

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

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'
Run Code Online (Sandbox Code Playgroud)

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

有帮助吗?谢谢!

jbe*_*yez 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'
Run Code Online (Sandbox Code Playgroud)

railties由于此gem包含在rails中,因此您不需要该行.然后,跑bundle install.这应该够了吧.