This may be awkward to set up, but will work once you're done. Fun facts:
Dir.glob(File.join RAILS_ROOT, 'app', 'models', '*.rb').collect{ |path| path[/.+\/(.+).rb/,1] }.collect(&:camelize).collect(&:constantize)
When a paperclip attachment gains a new style and you have many attachments, reprocessing can take ages. This is because...
Until May 2011 our gems have been created with Jeweler, which is a helper library to package code into a...
With defaults, RCov doesn't work the way you how you would like it to. To create a nice test...
To test concurrent code, you will need to run multiple threads. Unfortunately, when you use blocking system calls (e.g. locks...
For arrays of objects, uniq does not work as expected, since it uses strict equality. So [[1], [1]].uniq() == [[1...
To parse XML-documents, I recommend the gem nokogiri. A few hints: xml = Nokogiri::XML(" foo bar ") parses an xml...
sudo gem install gettext --no-ri --no-rdoc sudo gem install fast_gettext --no-ri --no-rdoc script/plugin install git://...
install apache sudo apt-get install ruby1.8-dev sudo gem install passenger sudo passenger-install-apache2-module follow the instructions
When you need to patch an existing gem, one way is to "vendor" the gem by copying it into the...
ActsAsSolr::Post.execute(Solr::Request::Delete.new(:query => "#{Location.solr_configuration[:type_field]}:#{ModelClass}")) ActsAsSolr::Post.execute(Solr::Request::Commit.new)
To call a class method (or static method) from an instance method: class.method() To call a class method from a...
This can happen during development when classes without automatic reloading are pointing to classes with automatic reloading. E.g. some class...
To run a single test file: rake test:units TEST=test/unit/post_test.rb rake test:functionals TEST=test/functional/posts_controller_test.rb rake test:integration TEST...
Basic configuration Please keep this config simple. It should be a starting point for new developers learning Git. [user]
You are getting when connecting via SSH or deploying with Capistrano (which uses SSH): Too many authentication failures for username...
Ruby Rails Any gem
Gem to provide nice looking urls ("/blog/the-greatest-bug-i-never-fixed"). If you don't need anything too special (like i18n for the urls...
Cerberus is a lightweight and easy-to-use Continuous Builder software for Ruby. It could be run periodically from a...
Given a list of acceptable elements and attributes, Sanitize will remove all unacceptable HTML from a string.
Awesome library to consume web services in Ruby.
This project is (or will be) a best effort semi-static verifier for your Ruby on Rails projects. Delivered as...
I have been playing around with RESTful Rails recently. Below is my collection or Rails REST howtos, tutorials and other...