Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Releasy Issues
- - By endless_dark Date 2013-06-30 16:42
Hello everyone, I'm trying to test Releasy to create the executables for my game but I can't get it to work.
I installed everything, created the example Rakefile and when I execute it I get:

Unable to activate releasy-0.2.2, because rake-0.9.6 conflicts with rake (~> 0.9.2.2)

So googling a bit, I read that I have to create a Gemfile requiring rake in it.
So after doing that, I execute it again and I get:

rake aborted!
cannot load such file -- releasy

What is going on?

Thanks!
Parent - - By jlnr (dev) Date 2013-06-30 16:47
I think if you create a Gemfile that contains all of rake, release as well as your other gems (e.g. gosu), this should work-

bundle exec rake <your_task_name>

Bundle ensures that Ruby sees the gems in the Gemfile, and only these.
Parent - - By ml Date 2013-07-05 05:20
Hi, I am posting here, because I have run into a very similar situation. I am trying to compile a very simple, basic game, using releasy. I have created the Gemfile and the Rakefile, per the instructions on the readme. I have added to the Gemfile:  gem "rake", "~>0.9.2.2" due to the same compatibility issue mentioned above.

My biggest problem is that I don't actually really know exactly how to use rake properly. When following these instructions:

bundle exec rake <your_task_name>

I run into the problem that I DON'T KNOW WHAT MY TASK NAME SHOULD BE BECAUSE I AM A NEWB...

I have tried simply typing:

$ rake

as well as:

$ bundle exec rake

and I get:

rake aborted!
wrong number of arguments (3 for 1)

Any suggestions?....

For reference, and in case it helps, the project, with the Rakefile and the Gemfile, are included here:
https://github.com/MattLemmon/cat2

BTW, the cat2 github includes the wrapper folder and the wrappers themselves, to demonstrate how I have everything laid out.

Best wishes to all.
Parent - - By jlnr (dev) Date 2013-07-06 17:13
You should be able to list all available rake tasks using bundle exec rake -T.
Parent - - By ml Date 2013-07-07 02:29
Thank you, this has helped me to get moving in the right direction!

I tracked down the issue to the following two lines from the Rakefile:
12    files "lib/**/*.rb", "config/**/*.yml", "media/**/*.*"
13    exposed_files "README.html", "LICENSE.txt"

I can get a list of available tasks when I comment out the files in the following manner:
12    files "lib/**/*.rb"                                #, "config/**/*.yml", "media/**/*.*"
13    exposed_files "README.html"      #, "LICENSE.txt"

It appears that this gives rake the "correct" number of arguments, so that when I type "bundle exec rake -T" it gives me a list of tasks.

Then when I run
bundle exec rake build:osx:app

it goes through and starts building the app... but of course it stops working when it runs into the part where it needs the files which I have commented out.

So I am still up against this 'wrong number of arguments' difficulty. It seems that rake wants me to only list 1 file, and 1 exposed_file, instead of the the 3 files and 2 exposed_files which are needed.

Not sure if it makes a difference, but I am on Ubuntu 12.04, using RVM.

Also, the 'wrong number of arguments' issue seems to be coming from the following code in /gems/releasy-0.2.2/lib/releasy/project.rb:

91    def exposed_files; @exposed_files; end
92    def exposed_files=(files); @exposed_files = Rake::FileList.new files; end
93
94    def files; @files; end
95    def files=(files); @files = Rake::FileList.new files; end

I would make some manual adjustments to get it to work, but for someone like me, this would be akin to a four-year-old trying to rebuild an automobile transmission - well, actually, more like a two-year-old trying to rebuild a transmission....
Parent - - By jlnr (dev) Date 2013-07-07 08:50
I haven't tried this in a while, but I think you need to pass the filenames as arrays:

12    files ["lib/**/*.rb", "config/**/*.yml", "media/**/*.*"]
13    exposed_files ["README.html", "LICENSE.txt"]
Parent - By ml Date 2013-07-07 10:01
Thank you, this is an enormous help!
Parent - - By ml Date 2013-07-07 23:25
Just a quick update. Passing the files as an array made a big difference. I am still experimenting with Releasy and trying to figure it all out. I added a readme.txt file and a license.txt file, as well as adding the file media/icon.icns. Baby steps...
Parent - - By Spooner Date 2013-07-08 02:15
Sorry about that... The docs online are ahead of the release of Releasy (that is the only real issue), which doesn't help a great deal!

EDIT: Keep meaning to go back and test the newer version properly so I can release it, but the tests are fubar...*makes feeble excuses*
Parent - - By ml Date 2013-07-10 06:14 Edited 2013-07-10 06:23
No worries whatsoever. All of this - Gosu, Chingu, Releasy, etc. - is very, very, very awesome. I can't say thank you enough!

I'm still working on trying to compile with Releasy. I have successfully created something which appears to be a working mac .app - it has the icon I created and everything. I tried testing it (the .app file, not releasy) on mac osx 10.4, and it didn't work. However, I think that it very possibly might work on osx 10.5. I plan to upgrade to 10.5 in order to test it out properly. However, this will take a few days or more (must back everything up first). I also intend to get access to a pc and test Releasy out on there. This will also take some time.

I tried to compile for windows (from Ubuntu) using:
$ bundle exec rake build:windows:wrapped

and I got:
WARNING:  Error fetching data: SocketError: getaddrinfo: Name or service not known (http://rubygems.org/specs.4.8.gz)
rake aborted!
Gem json is binary, but 1.7.6 does not have a published binary
Tasks: TOP => build:windows:wrapped => pkg/cat_game_0_0_1_WIN32

I am not sure exactly what this means, but I take it as a sign that I am moving in the right direction...
Parent - By Spooner Date 2013-07-10 07:59
I'd recommend using VirtualBox to install a version of Windows for the purpose of testing (I also have one that runs Mountain Lion).

Don't put the json gem in your Gemfile. JSON is included in the standard library from Ruby 1.9.2. Since Releasy is not a cross-compiler, it can't add binary gems for another OS unless they have been compiled.

If you absolutely have to use Ruby 1.8.7 and cross-build, then use the json_pure gem, which is implemented in Ruby (but is, obviously, much slower than the C extension version).
Parent - - By jlnr (dev) Date 2013-07-10 12:11
I have recently dropped support for 10.4. The current .app should work on 10.5 though (which is the oldest test system I have).
Parent - - By ml Date 2013-07-11 02:43
You guys are great! I found JSON being required in Gemfile.lock, which I think must have been created by bundler. I deleted the relevant line from Gemfile.lock, and then ran:
$ bundle exec rake build:windows:wrapped

and it appears to have worked! :)

I have now created a probably-working .app and a probably-working .exe.

I installed VirtualBox to try to test out the .exe, but it is going to take me some time to get my hands on a good Windows Install .iso in order to get VirtualBox all set up. In the interim, I will easily be able to test the .exe on a pc in the next day or two.

Regarding mac 10.4, this is a good impetus for me to update to 10.5, which I have been planning and preparing to do for a long time. I am making progress on this front. Perhaps in a another day or two...

I also might possibly try running mac 10.5 on VirtualBox, since I already have the mac 10.5 install .iso....

In summary - thank you this is awesome!
Parent - - By ml Date 2013-08-06 06:29
Hey guys just a quick update about my efforts to use Releasy. I ended up trying out installing Ruby on a Windows machine, and it was so easy to do, that I ended up just installing Ruby on the destination computer, which I had been trying to compile the .exe for. So, it was a success, except that I still have not figured out how to fully utilize Releasy on my setup (Ubuntu). I am still going to keep picking away at it. In the interim I've been working on some other Gosu/Chingu related projects, and making slow but steady progress. Previously, I wasn't able to load almost any of the  games from the Gosu Showcase. Now I have gone through and successfully loaded up a bunch of different ones. I'm still having trouble with Bottomless Mine and a few others, but I am making significant progress. I will post about my current gosu project in the Showcase. Thanks as always.
Parent - - By allcaps Date 2013-08-07 05:46
If you figure releasy out, please let me know.  I've been just using ocra to make an .exe for windows friends.  It works fine for Gosu games on Windows.  Just "ocra gosu_game.rb" and then exit the game after it starts, spits out an exe.  "gem install ocra" to get it.  Dunno if it works on other platforms, but it works great on Windows.
Parent - By lol_o2 Date 2013-08-07 06:20
There are random bugs on different computers when using advanced Open GL stuff (like framebuffers), so sharing Gosu games, at least on Windows, is fully possible only with pure Gosu. Just saying.
Parent - By ml Date 2013-08-10 01:19
@allcaps, I'm still working on figuring out Releasy. It seems that I need to learn more about Rake. I will definitely try the "ocra" approach you described (thanks for the helpful suggestion), and see if it works for me. I mostly work on Linux (Ubuntu) and my access to a PC is "sometimes," but I should be able to give it a try in the upcoming weeks.

@lol_02, very good to know about the limitations of Releasy with gl effects. What if I'm not using any gl effects, and the only gems are Gosu and Chingu?...

Regardless, the main problem I have right now is a PEBCAK error ("Problem Exists Between Chair And Keyboard"). I'm still working at it, and I have decided that, for me, with my current level of skills and knowledge, compiling to .exe and .app are going to be long-term goals. I will post to this thread when I make significant progress.
Up Topic Gosu / Gosu Exchange / Releasy Issues

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill