How do I require a specific version of a ruby gem?

前端 未结 2 777
自闭症患者
自闭症患者 2021-01-30 16:56

Specifically, the ruby-oci8 gem. I have both 1.0.7 and 2.0.4 installed. I want 1.0.7.

I can just require oci8, but I don\'t get the version I want.

irb         


        
2条回答
  •  [愿得一人]
    2021-01-30 17:16

    Try the following syntax (instead of require):

    require_gem 'RMagick' , '=1.10'
    require_gem 'RMagick' , '>=1.10'
    require_gem 'rake', '>=0.7.0', '<0.9.0'
    

提交回复
热议问题