Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not load rails without loading bundler #16046

Merged
merged 1 commit into from Jul 4, 2014

Conversation

grosser
Copy link
Contributor

@grosser grosser commented Jul 4, 2014

This if File.exist seems like a bad idea / let's people run into weird issues when the Gemfile is missing (deploy messed up / deleted by accident / BUNDLE_GEMFILE pointed to invalid file etc).
Users that do not want bundler can just remove the require.

@josevalim @rafaelfranca

@jwswj
Copy link

jwswj commented Jul 4, 2014

👍

@rafaelfranca
Copy link
Member

Could you explain more about the problem? I think that if we don't require bundler/setup Rails will fail to boot when we call Bundler.require on the application.rb. Is this not what is happening?

@grosser
Copy link
Contributor Author

grosser commented Jul 4, 2014

with default application.rb
config/application.rb:7:in `<top (required)>': uninitialized constant
Bundler (NameError)

without Bundler.require
/opt/boxen/rbenv/versions/2.1.1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in
`require': cannot load such file -- some_git_dependency (LoadError)

without Bundler.require and no git-dependencies:
boots up with incorrect versions of gems and randomly fails on something

On Fri, Jul 4, 2014 at 8:17 AM, Rafael Mendonça França <
notifications@github.com> wrote:

Could you explain more about the problem? I think that if we don't require
bundler/setup Rails will fail to boot when we call Bundler.require on the
application.rb. Is this not what is happening?


Reply to this email directly or view it on GitHub
#16046 (comment).

@rafaelfranca
Copy link
Member

I see. If you removed the Bundler.require from application.rb you can easily remove the if File.exist? but since our default application.rb use bundler and will not work if that require is not made is better to remove that if indeed.

rafaelfranca added a commit that referenced this pull request Jul 4, 2014
Do not load rails without loading bundler
@rafaelfranca rafaelfranca merged commit 871af91 into rails:master Jul 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants