Tag: ruby
-
Multiple DB connections in Rails/ActiveRecord
You might often want to connect to different databases using ActiveRecord. Here’s how you do it: #DB definitions: class DatabaseCurrent < ActiveRecord::Base self.abstract_class = true establish_connection settings[‘database’] end class DatabaseOld < ActiveRecord::Base self.abstract_class = true establish_connection settings[‘database2’] end #Model definitions (current): class Video < DatabaseCurrent belongs_to :user set_table_name :videos end class Photo < DatabaseCurrent belongs_to […]
-
JRuby Compiler Update, and a Nice Peformance Milestone
JRuby Compiler Update, and a Nice Peformance Milestone. Cool stuff.
-
RubyNetBeans
I highly recommend people to switch to RubyNetBeans (the Netbeans support in Ruby) for people who prefer an IDE-heavy approach to development. I still use Textmate, but the integrated webserver support, shell script automation, and esp. the new debugger (which is still slow), is really useful.
-
JRuby/Glassfish Investigation
I’ve been keeping an eye on the JRuby scene for a while now and I recently went about benchmarking again. JRuby is interesting because it has the potential to bring robust Java deployment and tools to the Ruby world. I made a simple widgets application as outlined here and installed JRuby/Glassfish as outlined here (both […]