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

really install the requested version of bundler #24

Merged
merged 2 commits into from
Mar 27, 2020

Conversation

jnicho02
Copy link
Contributor

fixes #23

Bundler won't uninstall because it is a 'default' gem and you won't end up running the version you added. Deleting the default gemspec first removes its protection. 'dip bundle -v' to check

fixes evilmartians#23 

Bundler won't uninstall because it is a 'default' gem and you won't end up running the version you added. Deleting the default gemspec first removes its protection. 'dip bundle -v' to check
Copy link
Member

@palkan palkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks!

Just one minor comment.

@@ -56,7 +56,9 @@ ENV LANG=C.UTF-8 \

# Upgrade RubyGems and install required Bundler version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a link to this PR to the comment for clarification?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it okay now?

@palkan palkan merged commit 9fee06d into evilmartians:master Mar 27, 2020
@palkan
Copy link
Member

palkan commented Mar 27, 2020

Thanks!

@flvrone
Copy link

flvrone commented Dec 10, 2020

I'm afraid it causes trouble, here's what I'm getting with this approach when trying to run rails s:

/usr/local/lib/ruby/site_ruby/2.6.0/rubygems.rb:281:in `find_spec_for_exe': Could not find 'bundler' (1.17.3) required by your /app/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:1.17.3

And I am getting it when this exact bundler is installed and running the suggested command does not change a thing.

I've "reverted" the changes this PR introduces and everything works well just as it was before.

@jnicho02
Copy link
Contributor Author

Fair enough....but strange...I am using this every single day, also with the refinement of only running it when I definitely need a specific version of bundler:

RUN if test -z "$BUNDLER_VERSION"; then \ gem update --system; \ else \ gem update --system \ && rm /usr/local/lib/ruby/gems/*/specifications/default/bundler-*.gemspec \ && gem uninstall bundler \ && gem install bundler -v $BUNDLER_VERSION; \ fi

@chadwilken
Copy link

I reverted this and it works good for me just updating the system and installing the specific version

@oliverklee
Copy link
Contributor

oliverklee commented Jan 21, 2022

I reverted this and it works good for me just updating the system and installing the specific version

The same for us: We had to revert this to get rspec to work in RubyMine again. (On the console using dip, rspec was already working fine.)

@jandudulski
Copy link
Contributor

BTW, since 2.3.0 it's simpler to deal with different versions - bundler will install it automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

installing the requested version of bundler
6 participants