strange inability to require config/boot after upgrading to ruby 1.9.2

前端 未结 7 1572
孤独总比滥情好
孤独总比滥情好 2020-12-05 04:18

I upgraded my ruby to 1.9.2 and now when I try to start up a Rails 2.3.5 app with script/server I get this error:



        
7条回答
  •  执笔经年
    2020-12-05 05:08

    it's because ruby 1.9.2 doesn't add the current directory in the LOAD_PATH.

    Add this that in top of your script/server file:

    $: << File.dirname(__FILE__)
    

    Or in your case:

    $: << File.dirname(__FILE__) + '..'
    

提交回复
热议问题