This project is archived and is in readonly mode.
'rails server' command ignores BUNDLE_GEMFILE
Reported by Jeremy Grant | December 17th, 2010 @ 06:44 AM | in 3.0.5
When running
rails new APP_NAME
the config/boot.rb that is generated in Rails 3 ignores and
overrides the BUNDLE_GEMFILE environment variable with the default
of 'Gemfile'.
see:
https://github.com/rails/rails/blob/master/railties/lib/rails/gener...
You can workaround this with no code changes by using
bundle exec rails server
Or just change config/boot.rb line 4 from
gemfile = File.expand_path('../../Gemfile', FILE)
to something like
gemfile = File.expand_path('../../' + (ENV['BUNDLE_GEMFILE'] || 'Gemfile'), FILE)
Comments and changes to this ticket
-
Piotr Sarnacki December 17th, 2010 @ 12:46 PM
- Milestone cleared.
- Assigned user set to Piotr Sarnacki
- Importance changed from to Low
-
Repository December 17th, 2010 @ 03:09 PM
- State changed from new to resolved
(from [d1b4f3ba9f099707aded7578a2af1d088694a680]) Allow to use BUNDLE_GEMFILE env variable in boot.rb [#6184 state:resolved] https://github.com/rails/rails/commit/d1b4f3ba9f099707aded7578a2af1...
-
Repository December 17th, 2010 @ 03:11 PM
(from [f7e33620caffecb7f065c5e4f5a19597f8c35cdd]) Allow to use BUNDLE_GEMFILE env variable in boot.rb [#6184 state:resolved] https://github.com/rails/rails/commit/f7e33620caffecb7f065c5e4f5a19...
-
Samuel Kadolph December 17th, 2010 @ 07:42 PM
The fixes applied won't work if someone deletes Gemfile and sets
BUNDLE_GEMFILE
to one that does exist since it checks ifgemfile
exists and notENV['BUNDLE_GEMFILE']
. This is fixed in the master branch but not 3-0-stable branch.Attached is a backport of master changes to fix this problem.
-
Piotr Sarnacki December 17th, 2010 @ 09:25 PM
Samuel: I've already rebuilt the boot.rb file to use "require 'bundler/setup'", this is the preferred way to do that: https://github.com/rails/rails/commit/0646c706e69eddc7e1ee213c65952...
Sorry for confusion.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 6184 'rails server' command ignores BUNDLE_GEMFILE (from [d1b4f3ba9f099707aded7578a2af1d088694a680]) Allow t...
- 6184 'rails server' command ignores BUNDLE_GEMFILE (from [f7e33620caffecb7f065c5e4f5a19597f8c35cdd]) Allow t...