-
Notifications
You must be signed in to change notification settings - Fork 99
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
Ruby apps with gem dependencies do not run #39
Comments
Would you happend to remember what arguments you used to compile the package? From what I understand you should use the same Ruby version as the compiler does. Also, when compiling you should see the dependencies getting fetched from rubygems. So yes, it should do this automatically. |
I just did |
I got rbenv. Now to package an app I just want to know how to declare multiple gems as dependencies? |
I see, a |
I'm also experiencing this problem. test.rb
Dockerfile
|
maybe add Gemfile and do bundle install ?(now I can not reproduce problem, but I will try do it tomorrow) |
Hmm yea i had tried that as well :( |
hi, @sk-jlewis yes, the problem is still here. I tried to pack on my host machine, in docker, tried to install gems in the local path with a flag I found that And I see the error as above. It's like that GEM_PATH or GEM_HOME is not set. And I found that these two env vars set nil before the build. It's only my opinion based on reading sources. Maybe these vars set value anywhere after it. maybe creators can say what happens( |
I was able to resolve this with the following boilerplate at the top of the main file:
|
I'm struggling with the same problem on win10
my Gemfile:
Nothing I do seems to change gems recognized by rubyc -c test.rb.
But since I need eventmachine and serialruby gems I would have to require all of the requirements (and requirement requirements...) as well. Does someone have a working solution/howto for gems on windows? |
@quadur hi, I use rubyc too. did you try to use docker for build your binary file? |
Problem solved by restarting spring |
I was able to make it work. I found several important steps to success:
pack/test.rb:
pack/Gemfile:
pack/Gemfile.lock, it was critical that BUNDLED WITH is 1.15.3, that's what rubyc wants.
Compiled like
Based on my understanding of the output of |
I tried to run an app having a gem dependency, green_shoes, a Ruby gtk2 gui library.
After it compiled the script and outputed a.out file, running produces this error
Now at first take what i can infer is it is using ruby 2.4 to package an app, but since on my system i got 2.3.3, it wont load.
So how can we tell the packer to add those gems either from a local directory or fetch from rubygems.org or a custom version from github?
Dependencies should be automatically added , right? Else it should have prompted unavailability or asked to provide dependency path, while packing.
The text was updated successfully, but these errors were encountered: