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

Origen support Bundler 2.X? #332

Open
info-rchitect opened this issue Feb 27, 2019 · 7 comments
Open

Origen support Bundler 2.X? #332

info-rchitect opened this issue Feb 27, 2019 · 7 comments

Comments

@info-rchitect
Copy link
Member

info-rchitect commented Feb 27, 2019

Hi,

We are finally moving to updated hardware and software and are having issues running origen commands. We have to prepend 'bundle exec ' to every origen command for it to work.

peologin702:ppekit $ cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.5 (Maipo)"
peologin702:ppekit $ origen i
/nfs/local/.package/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.17.1/lib/bundler/runtime.rb:319:in `check_for_activated_spec!': You have already activated rake 10.4.2, but your Gemfile requires rake 10.5.0. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.17.1/lib/bundler/runtime.rb:31:in `block in setup'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.17.1/lib/bundler/runtime.rb:26:in `map'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.17.1/lib/bundler/runtime.rb:26:in `setup'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.17.1/lib/bundler.rb:107:in `setup'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.17.1/lib/bundler/setup.rb:10:in `<top (required)>'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from ./lbin/origen:59:in `<main>'

I notice we are using an old version of bundle. Is there any way to run bundler 2.X?

thx

@ginty
Copy link
Member

ginty commented Feb 28, 2019

As has been discussed previously, bundle exec or executing through a Bundler bin stub is the way that Origen is supposed to be run.

The installation guide does say to add ./lbin to your path for this reason - https://origen-sdk.org/origen/guides/starting/installing/#3._Modify_Your_%24PATH

If you don't have that it may or may not work, just depending on how your default system gems compare to your application requirements.

I haven't tried Bundler 2.0, but from looking at the release notes for it I wouldn't expect Origen to have any issues with it, though nor would I expect it to fix this issue you are having.

@info-rchitect
Copy link
Member Author

@ginty I believe I have converted my environment and our app to exactly what is recommended. My path has ./lbin included.

PATH=/nfs/tools/lsf/9.1/linux2.6-glibc2.3-x86_64/etc:/nfs/tools/lsf/9.1/linux2.6-glibc2.3-x86_64/bin:./lbin:...

So why isn't the binstub working?

@ginty
Copy link
Member

ginty commented Feb 28, 2019

Not easy to answer that, does it work if you invoke the binstub directly?

./lbin/origen i

@info-rchitect
Copy link
Member Author

@ginty We removed the old version of bundler and now get this error message:

-bash-4.2$ ./lbin/origen i
/nfs/local/.package/ruby-2.3.1/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs': Could not find 'bundler' (~> 1.7) - did find: [bundler-2.0.1] (Gem::LoadError)
Checked in 'GEM_PATH=/home/bcaqueli/.gem/ruby/2.3.0:/nfs/local/.package/ruby-2.3.1/lib/ruby/gems/2.3.0', execute `gem env` for more information
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1438:in `block in activate_dependencies'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1427:in `each'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1427:in `activate_dependencies'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1409:in `activate'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/2.3.0/rubygems.rb:196:in `rescue in try_activate'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/2.3.0/rubygems.rb:193:in `try_activate'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:125:in `rescue in require'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/origen-0.36.1/lib/origen.rb:15:in `<top (required)>'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/origen-0.36.1/lib/origen/site_config.rb:12:in `require_relative'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/origen-0.36.1/lib/origen/site_config.rb:12:in `<class:SiteConfig>'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/origen-0.36.1/lib/origen/site_config.rb:2:in `<module:Origen>'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/origen-0.36.1/lib/origen/site_config.rb:1:in `<top (required)>'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
        from /nfs/local/.package/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
        from ./lbin/origen:22:in `<main>'

But to answer your question using the full path to the lbin bundler didn't work either.

@ginty
Copy link
Member

ginty commented Feb 28, 2019

I think you should forget about Bundler 2.0 for now and re-install a working version of Bundler again at system level, run gem install origen to do this.

After you've done that can you post the output from running gem list at the system level (i.e. outside of an Origen app workspace).

@ginty
Copy link
Member

ginty commented Feb 28, 2019

Don't think the gem list thing will help much actually, but definitely run the gem install origen to fix your current state and also update your system Origen to latest.

@ginty
Copy link
Member

ginty commented Feb 28, 2019

If it still doesn't work after that, try deleting your existing lbin/origen file and run Origen again, it should generate a replacement.

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

No branches or pull requests

5 participants