Category Archives: Ruby on Rails

Issues with thinking sphinx

I recently faced some issues with thinking sphinx which sharing here so that it helps others. Has many association not working: I had a model named User which has many tracks and the very basic index definition is as follows: ThinkingSphinx::Index.define :track, :with => :active_record do indexes title indexes [artist.first_name, artist.last_name], :as => :artist_name, :sortable…

Read More

Uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)

This error may occur to run older Rails application for conflicting with rubygems version. After a long googling I’ve come out in to following three solutions: Using Bundler.:Click here if you are interested to see the solution. Changing rubygems version: Downgrade the rubygems to an earlier version using gem update –system {version} Add “require ‘thread’”…

Read More

Rename rails3 application

Just published new version of rename gem with following changes: Sanitize new name Search/Replace module name in all files under root and config Change session key Change directory name InstallationAdd this line to your application’s Gemfile: gem ‘rename’ Uses rails g rename:app_to NewNamerails g rename:app_to “New-Name”

How to rename Rails3 application

A Rails3 application name are using as a Ruby name space for entire application and throughout the project tree as well. So, If anyone later decide to change the project name, then have to replace the name in the following files: Rakefileconfig.ruconfig/routes.rbconfig/application.rbconfig/environment.rbconfig/environments/development.rbconfig/environments/test.rbconfig/environments/production.rbinitializers/secret_token.rbinitializers/session_store.rb You can run following command in your project root, to find out the…

Read More