rails/rails — Issue #4749: `rails new --edge` creates Gemfile with conflicting requirements
Author: petervandenabeele
Created: 2012-01-29 22:03:48+00:00
State: open

From rails 3.2.1, rails new --edge creates a Gemfile with conflicting
requirements:

```ruby
gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'journey', :git => 'git://github.com/rails/journey.git'
gem 'arel', :git => 'git://github.com/rails/arel.git'

gem 'sqlite3'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', :git => 'git://github.com/rails/sass-rails.git', :branch => '3-2-stable'
gem 'coffee-rails', :git => 'git://github.com/rails/coffee-rails.git', :branch => '3-2-stable'
...
```
This causes:

```ruby
Bundler could not find compatible versions for gem "railties":
In Gemfile:
sass-rails (>= 0) ruby depends on
railties (~> 3.2.0) ruby

rails (>= 0) ruby depends on
railties (4.0.0.beta)
```
and

```ruby
Bundler could not find compatible versions for gem "railties":
In Gemfile:
coffee-rails (>= 0) ruby depends on
railties (~> 3.2.0) ruby

rails (>= 0) ruby depends on
railties (4.0.0.beta)
```

I was able to work-around by depending on the master branch of
sass-rails and coffee-rails. The full log:

```bash
peterv@ASUS:~/b/github/petervandenabeele$ rvm current
ruby-1.9.3-p0
peterv@ASUS:~/b/github/petervandenabeele$ rails --version
Rails 3.2.1
peterv@ASUS:~/b/github/petervandenabeele$ cat /home/peterv/.railsrc
cat: /home/peterv/.railsrc: No such file or directory
peterv@ASUS:~/b/github/petervandenabeele$ rails new new_app --edge
create
create README.rdoc
...
create vendor/plugins/.gitkeep
run bundle install
Updating git://github.com/rails/rails.git
Updating git://github.com/rails/journey.git
Updating git://github.com/rails/arel.git
Updating git://github.com/rails/sass-rails.git
Updating git://github.com/rails/coffee-rails.git
Fetching source index for https://rubygems.org/
Bundler could not find compatible versions for gem "railties":
In Gemfile:
sass-rails (>= 0) ruby depends on
railties (~> 3.2.0) ruby

rails (>= 0) ruby depends on
railties (4.0.0.beta)

peterv@ASUS:~/b/github/petervandenabeele$ cd new_app/
peterv@ASUS:~/b/github/petervandenabeele/new_app$ cat Gemfile
source 'https://rubygems.org'

gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'journey', :git => 'git://github.com/rails/journey.git'
gem 'arel', :git => 'git://github.com/rails/arel.git'

gem 'sqlite3'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', :git => 'git://github.com/rails/sass-rails.git', :branch => '3-2-stable'
gem 'coffee-rails', :git => 'git://github.com/rails/coffee-rails.git', :branch => '3-2-stable'
...

peterv@ASUS:~/b/github/petervandenabeele/new_app$ cp Gemfile Gemfile.ORIG
peterv@ASUS:~/b/github/petervandenabeele/new_app$ vim Gemfile
peterv@ASUS:~/b/github/petervandenabeele/new_app$ diff Gemfile.ORIG Gemfile
13,14c13,14
< gem 'sass-rails', :git => 'git://github.com/rails/sass-rails.git', :branch => '3-2-stable'
< gem 'coffee-rails', :git => 'git://github.com/rails/coffee-rails.git', :branch => '3-2-stable'
---
> gem 'sass-rails', :git => 'git://github.com/rails/sass-rails.git' #, :branch => '3-2-stable'
> gem 'coffee-rails', :git => 'git://github.com/rails/coffee-rails.git' #, :branch => '3-2-stable'
peterv@ASUS:~/b/github/petervandenabeele/new_app$ bundle install
Updating git://github.com/rails/rails.git
Updating git://github.com/rails/journey.git
Updating git://github.com/rails/arel.git
Updating git://github.com/rails/sass-rails.git
Updating git://github.com/rails/coffee-rails.git
Fetching source index for https://rubygems.org/
Using rake (0.9.2.2)
Using i18n (0.6.0)
Using multi_json (1.0.4)
Using activesupport (4.0.0.beta) from git://github.com/rails/rails.git (at master)
Using builder (3.0.0)
Using activemodel (4.0.0.beta) from git://github.com/rails/rails.git (at master)
Using erubis (2.7.0)
Using journey (1.0.1.20120126102309) from git://github.com/rails/journey.git (at master)
Using rack (1.4.1)
Using rack-cache (1.1)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.2.0)
Using actionpack (4.0.0.beta) from git://github.com/rails/rails.git (at master)
Using mime-types (1.17.2)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.4.1)
Using actionmailer (4.0.0.beta) from git://github.com/rails/rails.git (at master)
Using arel (3.0.0.20120112113618) from git://github.com/rails/arel.git (at master)
Using tzinfo (0.3.31)
Using activerecord (4.0.0.beta) from git://github.com/rails/rails.git (at master)
Using activeresource (4.0.0.beta) from git://github.com/rails/rails.git (at master)
Using bundler (1.0.21)
Using coffee-script-source (1.2.0)
Using execjs (1.3.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using json (1.6.5)
Using rdoc (3.12)
Using thor (0.14.6)
Using railties (4.0.0.beta) from git://github.com/rails/rails.git (at master)
Using coffee-rails (3.2.0) from git://github.com/rails/coffee-rails.git (at master)
Using jquery-rails (2.0.0)
Using rails (4.0.0.beta) from git://github.com/rails/rails.git (at master)
Using sass (3.1.12)
Using sass-rails (4.0.0.beta) from git://github.com/rails/sass-rails.git (at master)
Using sqlite3 (1.3.5)
Installing uglifier (1.2.3)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
```