开发者

custom_require.rb:36:in `require': no such file to load -- myapp(LoadError)

i get the above error, all i did was install rvm and update to ruby 1.9.2 from the default ruby that you get with mac.

开发者_如何学运维

all my gems appear in the gem list but do i need to specify a path somewhere?

cheers,

glenno.


Check that you have the gems installed gem list If not, install as usual gem install whatever or if you want a specific version gem install whatever -v 1.2.3 Or if you have bundler in your project (ie Rails), it's just bundle install

If you have all the gems, then this is probably a local file, and you're probably coming from Ruby version < 1.9, you need to either fix your $LOAD_PATH (which will depend on too many factors for me to explain here), or specify the full path to the file you want File.dirname(__FILE__) + '/myapp'

Otherwise, you need to give more info, like what version you used to be running, what myapp is, and where it is in relation to your file.


In my case it was rvm issue, I was using rvm 1.9 when i changed it to 1.8, migration worked.

rvm use 1.8


In my case I was converting to Cygwin64. The Cygwin directory name changed and Ruby upgraded to 1.9. After I fixed the Cygwin directory name, the second solution worked. Or at least got past this problem:

require File.dirname(FILE) + '/myapp.rb'

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜