LoadError by requiring a gem with :path or :git

前端 未结 2 1093
旧巷少年郎
旧巷少年郎 2021-01-04 20:22

I\'ve got a really strange problem here.

I forked a gem on github to do some modifications, cloned my repo on my local machine, made the changes and changed the Gemf

相关标签:
2条回答
  • 2021-01-04 20:38

    You can run with the bundler environment via:

    bundle exec ruby script.rb
    

    Or require bundler setup in your script before the gem(s) that are causing the issue.

    require 'bundler/setup'
    

    Most links I found out there about this pointed to documentation on Bundler's site, but most all of the links are dead now unfortunately.

    0 讨论(0)
  • 2021-01-04 20:43

    You'll have to load the bundler environment before running the test.rb

    bundle exec ruby test.rb
    
    0 讨论(0)
提交回复
热议问题