-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JRuby 9.1.2 / MacOS X / LoadError: no such file to load -- sinatra #4041
Comments
Your problem is you do not have sinatra installed in a GEM directory JRuby knows about (and C Ruby and JRuby cannot share the same GEM dirs because JRuby uses Java native extensions and Ruby uses native C extensions). So if you:
your app should run fine. |
@leleuj I should add that your detailed report also shows you what is up. When you do raw ruby you get a C ruby and when you call gem by itself it uses that C Ruby. When you use JRuby -S you are hitting the right sutff for JRuby. If you want 'gem' to work you just need to put JRuby's bin dir higher in your path than any C Ruby (rvm or other ruby manager should also be able to manage this for you). |
Many thanks. Just installed sinatra via jruby and it works ( |
Not sure if this is an actual bug, so I'll post into this old one here first. What is going on here?
As you can see I installed |
Using JRuby to launch a very simple sinatra app, I get the following error:
app.rb:
My environment:
Yes, Sinatra is installed:
but:
It works perfectly with:
ruby app.rb
:Adding:
require 'rubygems'
at the top of theapp.rb
file does not help, same error one line below:The text was updated successfully, but these errors were encountered: