...list like this: ----- Passenger processes ----- PID VMSize Private Name ------------------------------- 671 112.9 MB 95.5 MB Rails: /opt/www/project1/current 707 79.4 MB 60.5 MB Rails: /opt/www/project2/current 1094 88.1 MB 69.3 MB Rails: /opt/www/project3/current...

...MB 62.6 MB Rails: /opt/www/project4/current 1269 72.9 MB 55.6 MB Rails: /opt/www/project5/current

progfu.com

...go, all you need to do is prefix every command with zeus. That means rails server becomes zeus server, rails console becomes zeus console, and so on. From the Github...

Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second. Requirements: OS X 10.7+ or Linux...

...it will look like this: >> Socket.gethostname => "happycat" That should work right away for your Rails application. For plain Ruby, you first need to do: require 'socket'

...often is) different from the host that a user is requesting in their current Rails session (request.host). Also keep in mind that hostname might give you the FQDN depending on...

Add deprecation warnings and their solution or link to available solutions. Global access to Rake DSL methods is deprecated. Please...

...require to require_relative where I loaded RSpec factories in Cucumber's env.rb (the Rails application root is no longer in the load path by default) replacing the old debugger...

...to your Gemfile. iconv is a part of Ruby that was removed in 2.0. Rails 3 seems to depend on it. All the pain with magic # encoding: utf-8 comments...

makandra dev

You don't need a Rails application to use Sass. Even when you're working on a static site you can generate your CSS through Sass. Install Sass with sudo...

...gitignore to not exclude public/stylesheets/*.css, since stylesheets aren't being generated automatically without Rails (this would bite you after a deploy). Instead exclude .sass-cache, which will be created...

Run bundle update cucumber capybara cucumber-rails to update to the newest versions. Backup your features/support/path.rb to be able to add your own paths again after the cucumber installation script...

...your features/support/env.rb file to be able to reintegrate parts like your blueprints setup: ENV["RAILS_ENV"] ||= "cucumber" require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') require 'spec/support/blueprints' Run $ rails generate cucumber:install...

...images, this slows down development response times. You can fix that by defining a Rails route like this: if Rails.env.development? scope format: true, constraints: { format: /jpg|png|gif/ } do

...root path: xsendfile: unable to find file: /tmp/foo20110721-28050-1h104da-0 The reason for this is that Rails 3 uses X-Sendfile for file downloads and Apache is only allowed to transfer files...

makandra dev

Last week saw a security issue with rails 2.3 that required a fix. While an official patch was provided, the 2.3 branch is no longer maintained. So we forked it...

...but they are not very easily discoverable.) To use our fork, change the gem "rails"... line in your Gemfile to this: gem 'rails', :git => 'https://github.com/makandra/rails.git', :branch...

Ever wondered how Rails talks to itself in a Cucumber feature? In Rails 3 you can do it like this: def rack_env(path) { "rack.input" => {}, "PATH_INFO"=>"#{path}", "REQUEST_METHOD...

end request = rack_env('/users/new') response = Rails.application.call(request) status, headers, body = response puts status # e.g. 200 puts headers.inspect # hash of headers puts body.body # html of response body

Under certain (unknown) circumstances, Rails will give localized files an invalid content-type in the Response header. For me, after requesting corporate_information and rendering corporate_information.de.html.haml, Rails sent a content...

...topic that offer workarounds, but none solved it for me. The issue occurred with Rails...

pganalyze.com

...cover in detail how to utilize both views and materialized views within Ruby on Rails, and we can even take a look at creating and modifying them with database migrations...

You either have an old version of Mocha and an edge version of Rails 3.2, or you have a new version of Mocha and an old version of Rails. The...

...best solution is to update Mocha to the latest version and switch to Rails edge. If you are using shoulda-matchers or another gem that locks Mocha to an old...

...installing Bundler 1.1 you will get the following warning when running tests: WARNING: Cucumber-rails required outside of env.rb. The rest of loading is being defered until env.rb is called...

...To avoid this warning, move 'gem cucumber-rails' under only group :test in your Gemfile The warning is misleading because it has nothing to do with moving cucumber-rails into...

github.com

...is a MongoDB adapter for Ruby. We've forked it so it works for Rails 2.3.x applications running on Ruby 1.9. [1] makandra/mongomapper is based on the "official" rails2...

...it, add this to your Gemfile: gem 'mongo_mapper', :git => 'git://github.com/makandra/mongomapper.git', :branch => 'rails2' [1] The last version to be compatible with Rails 2 was 0.8.6: While there are...

weblog.rubyonrails.org

Rails 4.0 is finally ready after a thorough process of betas and release candidates. It's an amazing new version packed with new goodies and farewells to old features past...

rails-erd.rubyforge.org

Gem to generate entity relationship diagrams from your Rails 3 ActiveRecord models. The diagram style is pretty and configurable...

blog.plataformatec.com.br

This means Basecamp migrated from the first Rails release up to the edge one. So how come people say so frequently how hard is to update their applications from Rails...

...to Rails 2.2? And the answer is simple: plugins...

...led me to the solution: I had to write has_many placeholder.to_sym. When Rails can't find an association, make sure it's defined as symbol Seemingly, that's...

...a bug in Rails...

The ActionMailer in Rails 2 depends on a buggy version of TMail, which sometimes inserts a blank line into the mail header when sending a mail to multiple recipients. This...

...mail through an MTA like Exim, it will fix this for you. Fix for Rails if you don't have an awesome MTA TMail is no longer maintained. The bug...

makandra dev

Have you ever mistaken one Rails environment for another? The attached helper will help you to never do it again. Save the attached file to app/helpers/ and use the widget...

...in your layout like this: %body = rails_env_widget unless Rails.env.production? It'll render a small light gray box in the top left corner of your screen, containing the current...

This will show you how to create a RSS feed that the Feed Validator considers valid. Note that RSS is...

blog.plataformatec.com.br

It is common in Rails 3.0 applications that you want to provide default views for a group of controllers. Let’s say you have a bunch of controllers inside the...

...for Admin::PostsController and “app/views/admin/posts/index.html.*” is not available, it should then render “app/views/admin/defaults/index.html”. Since Rails 3.0, we have a new abstraction called resolvers that holds the logic to find a...