how do you start ruby 1.9 without rubygems

后端 未结 2 1186
慢半拍i
慢半拍i 2021-01-12 19:38

I want my app to not be able to use any installed gems. Is there a ruby 1.9 startup parameter or way of doing this programmatically?

2条回答
  •  一整个雨季
    2021-01-12 20:02

    ruby --disable-gems
    

    is the MRI (1.9) commandline parameter. "It prevents the addition of gem installation directories to the default load path". (The Ruby Programming Language, p. 391)

    Edit 25-10-2012: Ruby core had the same idea as @rogerdpack in the comments and added the more verbose ruby --help parameter. Ruby revision!

提交回复
热议问题