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:
The $: << File.dirname(__File__) + '..'
won't work since you'd get a dir of
'script..'
Try
$: << File.join(File.dirname(__FILE__),'..')
Please check your root path before start padrino. like if your application in "C:\XXXXXXX\YYYYYYY\ZZZ-padrino" here and you are in "C:\XXXXXXX\YYYYYYY\" in command prompt then this error will occur. then you should in "C:\XXXXXXX\YYYYYYY\ZZZ-padrino".
You might try to add the path source /usr/share/ruby-rvm/scripts/rvm
Much simpler, does not require modification of all scripts:
Instead of:
script/server
call:
./script/server
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__) + '..'
Replacing line 2 of script/server with
require File.expand_path('../../config/boot', __FILE__)
works for me (taken from Rails 3)