views:

644

answers:

6

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:

<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- script/../config/boot (LoadError)
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from script/server:2:in `<main>'

But script/server:2 definitely looks correct, and the file config/boot.rb exists in the right place.

+1  A: 

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

add that in top of your script/server file :

$: << File.dirname(__FILE__)

Or in your case

$: << File.dirname(__FILE__) + '..'
shingara
I added that but it still does't work
dan
yes it's parent directory in your case.
shingara
+2  A: 
Ian Fleeton
A: 

The $: << File.dirname(__File__) + '..' won't work since you'd get a dir of

'script..'

Try

$: << File.join(File.dirname(__FILE__),'..')
blackrat