Sometimes, my rails application gives an error (no such file to load -- rack) even if rack is installed.
[Gemfile] gem 'rack', '1.2.1'
If I refresh the page, it loads fine. So it's not the gem problem. What could cause the error?
Thanks.
Sam
I think if you start your website locally, this will not happen. So what service did you use? I've encountered this kind of bugs on DreamHost.
For DreamHost, the problem is they use different version (older) of Rack, which is not compatible with newest version of Rails. Try to specify the Rack version in your Gemfile (and in most cases, you have to downgrade Rails as well). It may help.
Another possible reason is that you use RVM on your local machine, but for servers, for example, Passenger + Nginx/Apache, RVM may not work well (actually, I'm always getting errors using Passenger + RVM). Specifying your Gem directory may help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With