I’ve dabbled with Titanium before, and it seems a handy platform for building mobile apps with. This may be a useful tool to use with it.
I’ve dabbled with Titanium before, and it seems a handy platform for building mobile apps with. This may be a useful tool to use with it.
So I’ve been using Appcelerator’s mobile development framework, Titanium, lately, and overall the experience has been good.
The benefits of being able to make use of my Javascript knowledge to build a multi platform mobile app that runs natively are huge.
There are a few problems with it though when you’re coming from Ruby.
This is where coffeescript comes in. Suddenly javascript starts looking good and you feel better about using it. Combine this with a sensible folder structure and separate your code into a more MVC-y way of doing things and Titanium looks like a contender for doing some serious app building.
I upgraded to 10.6.5 today and promptly discovered that I couldn’t restart Apache. I kept getting this error:
/usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument
A quick search and I found this post and it worked for me.
I got this error this morning after I thought it’d be a good idea to migrate my new Rails 3 app to Ruby 1.9.2.
Kind of a weird error because it doesn’t seem that helpful on the surface.
Digging into the Apache error logs revealed this error mesage:
[BUG] cross-thread violation on rb_gc()
(null)
Ok, now we’re getting somewhere. This is an error due to gems being compiled in a different version of Ruby. Ah, now it makes sense. I was using bundler with the path set to /my/app/gems and they were all compiled against REE 1.8.7.
rm -rf gems
bundle install --path gems
Fixed that problem. I then ran into another error message:
git://github.com/binarylogic/authlogic.git not checked out
I’m running the edge version of Authlogic and for some reason Passenger was having a hard time with it. Right, could be to do with me running preview 4 of Passenger 3. A quick
gem install passenger
and an update to httpd.conf later and my app was back.
Today I ran into a problem where we have a company gem that includes a bunch of helpful rake tasks, one of which imports a production database into your dev db.
I wanted to do some stuff after this rake import task that was specific to the application I’m working on.
I first tried to overwrite the task, like you would do with any Ruby method. No dice though, this had the effect of running my lib/import.rake task before the gem task that I was trying to override.
I saw a few posts about this but they all seem to be overkill for what I wanted. I didn’t want to monkey patch Rake unless I really had to.
Then I struck gold…
Rake::Task['some:task:name'].clear`
One line to stop the original task and then I could crack on and do whatever I wanted.
namespace :db do
task :import => :environment do
Rake::Task["db:import"].clear
...
Rake::Task["my_post_import_task"].invoke
end
end
Simple.