Skip to content

Bundler paths possibly breaking rails console #72

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

Closed
joearasin opened this issue Mar 1, 2016 · 1 comment
Closed

Bundler paths possibly breaking rails console #72

joearasin opened this issue Mar 1, 2016 · 1 comment

Comments

@joearasin
Copy link

This is possibly a duplicate of #53 and #51 --

When I attempt to run a rails console based off of a relatively straightforward dockerfile:

FROM ruby:2.2

# install packages
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs

# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY Gemfile /usr/src/app/
COPY Gemfile.lock /usr/src/app/

RUN bundle install

COPY . /usr/src/app

CMD bundle exec rails s Puma -p 32000 -b '0.0.0.0'

I receive an Error:

/usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler/setup (LoadError)
    from /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/bundle/gems/spring-1.3.6/lib/spring/commands.rb:33:in `<module:Spring>'
    from /usr/local/bundle/gems/spring-1.3.6/lib/spring/commands.rb:4:in `<top (required)>'
    from /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/bundle/gems/spring-1.3.6/lib/spring/application.rb:77:in `preload'
    from /usr/local/bundle/gems/spring-1.3.6/lib/spring/application.rb:143:in `serve'
    from /usr/local/bundle/gems/spring-1.3.6/lib/spring/application.rb:131:in `block in run'
    from /usr/local/bundle/gems/spring-1.3.6/lib/spring/application.rb:125:in `loop'
    from /usr/local/bundle/gems/spring-1.3.6/lib/spring/application.rb:125:in `run'
    from /usr/local/bundle/gems/spring-1.3.6/lib/spring/application/boot.rb:18:in `<top (required)>'
    from /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from -e:1:in `<main>'                                                                                                                                 

If I insert a gem install bundler in the dockerfile before executing bundle install, I'm in the clear.

But this feels a bit wrong -- I'm not sure if there's a path variable that needs to be set so the system bundler install can then be used.

@joearasin
Copy link
Author

Ah never mind -- It was a now-closed issue in Spring 1.6.3. Noting in case anyone runs into this in the future.
https://github.com/rails/spring/blob/master/CHANGELOG.md

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

No branches or pull requests

1 participant