Category: Ruby
-
Startup Scripts on OS X
I have a set number of programs that I usually want to start when my macbook pro boots up. But sometimes I want to boot in a hurry and all the startup items bother me. I came up with a solution I thought I’d pass on. I load Aquamacs automatically, as I use it for […]
-
Pagination
The paginate function was removed from core rails in 2.0. No problem since my server ran an earlier version of rails. Until Bluehost updated rails without telling me. Easy enough to fix. In your project type: script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination Then tar up your vendor folder and move it to the server, or use a better […]
-
Getting Rails Up on OS X
If you’re having problems with the standard OS X install of ruby, check out http://hivelogic.com/articles/ruby-rails-mongrel-mysql-osx/.
-
Debugging Method For Rubyclass Object
class Object def additional_methods if self.instance_of?(Class) self.methods.sort – Class.methods else self.methods.sort – Object.methods end end end #example usage class Foo def self.a end def Foo.b end def c end def d end end {:class=>Foo,:instance=>Foo.new}.each do |name,obj| puts “#{name} additional methods: #{obj.additional_methods.join(‘,’)}” end