rubymacrubyhotcocoa

How do I get hotcocoa to create a default project?


I followed these steps:

  1. Download MacRuby.

  2. Double-click on the zip file to extract it and double-click on the package inside the extracted directory to start the install. Just go with the defaults.

  3. You may want to kill off terminal.app if you have it running and restart it, just in case the install put anything into the environment.

  4. Use the following to install the hotcocoa macgem:

    sudo macgem install hotcocoa
    
  5. Change to the directory that you want your project directory to reside in:

    mkdir -p /path/to/my/projects/
    cd /path/to/my/projects/
    
  6. Create a sample hotcocoa app:

    hotcocoa nameofyourapp
    

But I get this error:

/usr/bin/hotcocoa:18:in `<main>': Could not find RubyGem hotcocoa (>= 0)

When I had the hotcocoa gem (not the macgem) installed, I got this error:

/Users/jeremysmith/.rvm/gems/ruby-1.9.2-p180/gems/hotcocoa- 0.5.1/lib/hotcocoa/template.rb:20:in
 `gsub!': invalid byte sequence in UTF-8 (ArgumentError)

Solution

  • I fixed the problem with the help of ferrous26. I needed to:

    1. Turn RVM off with

        rvm use system
      
    2. make sure that the hotcocoa gem was installed as a macgem and not a RubyGem.
    3. Use the forked version of hotcocoa that is found here: https://github.com/ferrous26/hotcocoa