Re: [MacRuby-devel] Focus window from second XIB
If the file's owner is the controller, you should not be adding a controller object to the nib, because then you will wind up with two of them.
Makes sense. And reading a little on File's Owner, it seems to be the right choice - at least for other than the MainMenu.xib. Setting up a separate NSObject as delegate is how it's done in the "MacRuby in Action" book for MainMenu.xib. Apparently it doesn't really work for other XIBs though. Is there any particular advantage a separate delegate has compared to File's Owner?
I've stopped fighting with gems and just gave into the new --gem option in macruby_deploy today. Alas, I'm fighting with gems again. My app, which I'm adding features to, btw, has been running quite nicely here at UC Berkeley to drive Selenium as a web app probing and monitoring device. I'm getting this error as I try to embed the action_mailer gem in my app: Cannot locate gem `action_mailer' in ["/Users/r/.gem/macruby/1.9.2", "/Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2"] But I've got the action_mailer gem in both locations, along with it's dependencies, so I'm confused. It'd be nice if there was a definitive web page for managing gems in MacRuby (or maybe there is and I'm missing it). Part of the problem is that I'm using RVM which has a distinct file hierarchy.... thanks, russ
On Mar 1, 2011, at 18:57 , Russ McBride wrote:
I've stopped fighting with gems and just gave into the new --gem option in macruby_deploy today. Alas, I'm fighting with gems again.
My app, which I'm adding features to, btw, has been running quite nicely here at UC Berkeley to drive Selenium as a web app probing and monitoring device.
I'm getting this error as I try to embed the action_mailer gem in my app:
Cannot locate gem `action_mailer' in ["/Users/r/.gem/macruby/1.9.2", "/Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2"]
But I've got the action_mailer gem in both locations, along with it's dependencies, so I'm confused.
It'd be nice if there was a definitive web page for managing gems in MacRuby (or maybe there is and I'm missing it). Part of the problem is that I'm using RVM which has a distinct file hierarchy....
1) Don't thread hijack. Some (most?) of us use real mail clients and you're screwing up threading. 2) Don't fight with gems. You'll lose. :P 3) Don't embed gems inside of gems. Use gem dependencies properly and you'll be a lot happier. Using hoe it is as simple as: Hoe.spec 'my_thingy' do developer 'Ryan Davis', 'ryand-ruby@zenspider.com' dependency 'action_mailer', '~> 3.0' end Then a regular gem activation or require should find the gem just fine.
oh, the command I'm using in my build script PATH="$PATH:/usr/local/bin" macruby_deploy --gem action_mailer --embed "$TARGET_BUILD_DIR/$PROJECT_NAME.app"
macruby_deploy gets the rubygems source code to actually look up the gem. You mentioned that you use RVM. Did you configure your GEM_PATH and GEM_HOME so that they point to the non-RVM places or were you just making the directories yourself? Rubygems looks for its cache of gemspecs to find the gems, so if the directory layout in /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2 is not what it expects then it will not find the gems. /Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2 should have these directories in it: cache/ doc/ gems/ specifications/ I think you only need the specifications and gems directory for things to work, but I am not sure. Mark Rada mrada@marketcircle.com On 2011-03-01, at 10:00 PM, Russ McBride wrote:
oh, the command I'm using in my build script
PATH="$PATH:/usr/local/bin" macruby_deploy --gem action_mailer --embed "$TARGET_BUILD_DIR/$PROJECT_NAME.app" _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Thanks Mark. Yeah, that's what I've got. Under Versions, Current is linked to 0.9 inside of which is: usr/lib/ruby/Gems1.9.2/ This has: cache/ doc/ gems/ specifications/ So it looks like it should work to me. GEM_PATH and GEM_HOME are controlled by rvm and adjusted which each change (i.e., like so: rvm use macruby-0.9). So neither environment variable points to the paths where macruby_deploy is looking. macruby_deploy is not relying on GEM_PATH or GEM_HOME. Stop the press: I got it working. Part of the problem was that in my code I had to do: require 'action_mailer', but in the build script I had to do --gem actionmailer. Sheesh. Now that's fixed, I still can't get any actual code working that relies on action mailer. I just switched to the Pony gem and this is looking golden. I'd recommend that instead of AC. Cheers, russ On Mar 1, 2011, at 7:19 PM, Mark Rada wrote:
macruby_deploy gets the rubygems source code to actually look up the gem.
You mentioned that you use RVM. Did you configure your GEM_PATH and GEM_HOME so that they point to the non-RVM places or were you just making the directories yourself?
Rubygems looks for its cache of gemspecs to find the gems, so if the directory layout in
/Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2
is not what it expects then it will not find the gems.
/Library/Frameworks/MacRuby.framework/Versions/0.9/usr/lib/ruby/Gems/1.9.2
should have these directories in it:
cache/ doc/ gems/ specifications/
I think you only need the specifications and gems directory for things to work, but I am not sure.
Mark Rada mrada@marketcircle.com
On 2011-03-01, at 10:00 PM, Russ McBride wrote:
oh, the command I'm using in my build script
PATH="$PATH:/usr/local/bin" macruby_deploy --gem action_mailer --embed "$TARGET_BUILD_DIR/$PROJECT_NAME.app" _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
participants (5)
-
Mark Rada
-
Russ McBride
-
Russ McBride
-
Ryan Davis
-
Sven Schwyn