larsch / ocra

One-Click Ruby Application Builder
http://ocra.rubyforge.org/
835 stars 83 forks source link

problems with ruby 3.1.1 (adding OSX support) #191

Open dataf3l opened 1 year ago

dataf3l commented 1 year ago

➜ exe gem install ocra Fetching ocra-1.3.11.gem Successfully installed ocra-1.3.11 Parsing documentation for ocra-1.3.11 Installing ri documentation for ocra-1.3.11 Done installing documentation for ocra after 0 seconds 1 gem installed ➜ exe ocra mine.rb /Users/b/.rvm/gems/ruby-3.1.2/gems/ocra-1.3.11/bin/ocra:20: warning: already initialized constant File::ALT_SEPARATOR === Loading script to check dependencies hello world === Detected gem error_highlight-0.3.0 (loaded, files) === 0 files, 0 bytes === Detected gem did_you_mean-1.6.1 (loaded, files) === 0 files, 0 bytes === Detected gem executable-hooks-1.6.1 (loaded, files) === 11 files, 6366 bytes === Detected gem bundler-unload-1.0.2 (loaded, files) === 4 files, 1683 bytes === Detected gem rubygems-bundler-1.4.5 (loaded, files) === 7 files, 6035 bytes === Detected gem bundler-2.3.7 (loaded, files) === 2 files, 1752 bytes === Detected gem pathname-0.2.0 (loaded, files) === 0 files, 0 bytes === Detected gem ocra-1.3.11 (loaded, files) === 5 files, 271800 bytes === Detected gem set-1.0.2 (loaded, files) === 0 files, 0 bytes === Including 0 encoding support files (0 bytes, use --no-enc to exclude) /Users/b/.rbenv/versions/3.1.1/lib/ruby/3.1.0/fiddle.rb:61:in initialize': dlopen(psapi, 0x0009): tried: 'psapi' (no such file), '/usr/local/lib/psapi' (no such file), '/usr/lib/psapi' (no such file), '/Users/b/study/ruby2/exe/psapi' (no such file) (Fiddle::DLError) from /Users/b/.rbenv/versions/3.1.1/lib/ruby/3.1.0/fiddle.rb:61:innew' from /Users/b/.rbenv/versions/3.1.1/lib/ruby/3.1.0/fiddle.rb:61:in dlopen' from /Users/b/.rvm/gems/ruby-3.1.2/gems/ocra-1.3.11/bin/ocra:1000:inloaded_dlls' from /Users/b/.rvm/gems/ruby-3.1.2/gems/ocra-1.3.11/bin/ocra:1027:in detect_dlls' from /Users/b/.rvm/gems/ruby-3.1.2/gems/ocra-1.3.11/bin/ocra:862:inbuild_exe' from /Users/b/.rvm/gems/ruby-3.1.2/gems/ocra-1.3.11/bin/ocra:1231:in `block in <top (required)>' ➜ exe

Vucius commented 1 year ago

Based on my personal experience, using ocra to package Ruby 2.6.5 is stable. From the error you provided, it seems that the packaging command needs to manually add the corresponding DLL.

Largo commented 1 year ago

OCRA does only work with Windows or maybe Wine. You seem to be using MacOS

dataf3l commented 1 year ago

Hi @Largo I changed the ticket title to reflect the requirement a bit better.

"problems with ruby 3.1.1 (adding OSX support)"

Having said that, I am open to help out, I have an osx machine I can give access to a person so they can do remote development, or alternatively I can also help testing out the solution on osx once there is something to test.

I think the overlap between ruby people and osx people is big, and if somebody were to make the embedder work for osx, that would probably create a new era of ruby osx applications, which are easy to build and also easy to distribute, a dream for open source and for hobbyists, this is why I think it's worth the time and effort to do the port.

just my opinion, considering every rails tutorial ever always seems to have osx behind it.

Largo commented 1 year ago

Hi @Largo I changed the ticket title to reflect the requirement a bit better.

"problems with ruby 3.1.1 (adding OSX support)"

Thanks, I'm considering adding it to my fork. ocran

I agree it would be a good feature. I recently made a python app with pythoninstaller and I could create an osx app. Annoyance on OSX is all the security.

I assume that you are aware about Rubymotion (commercial native apps on OSX) and Rubypacker (i have not tried it).

maxirmx commented 10 months ago

https://github.com/tamatebako/tebako supports Ubuntu, Alpine and MacOS packaging