The bane of any ruby/rails developer on a windows box (apart from piddling performance) is seeing the dreaded …
‘gem install error – ‘cl’ is not recognized as an internal or external command’
No more!
Devkit, a tool used by the folks who create the Windows Ruby Installer of each version of ruby helps you with (most) gems that need to be built natively.
Muchos Gracias to them for graciously providing it to us.
January 9th, 2011
In Authlogic, if you use a password confirmation field (when creating a new user perhaps), there is an error message that shows up for that field if the User model does not validate.
Something like
is too short (minimum is 4 characters)
Seems simple enough to turn off, but I almost went mad trying to figure out how do this without completely turning off password authentication.
class User < ActiveRecord::Base
acts_as_authentic do |c|
c.merge_validates_length_of_password_confirmation_field_options :allow_blank => true
end
end
PS: It’d be nice to get all the configuration options for Authlogic in one place, with better documentation for each one.
Maybe I should get on that … it is open source software after all
August 30th, 2010
You might have been happily running migrations on your development box for weeks and go to get the application set up on a production server.
And all might even have been going well until you ran
rake db:migrate
only to see it crash and burn like this.
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
development database is not configured
Fear not ye intrepid developer!
This happens when you leave out the development specifications in your database.yml.
(If you don’t define development.rb, you’ll get a weirder “No such file or directory – …../development.rb” error)
Apparently rake db:migrate runs in development mode no matter what environment you’re in (still looking into the reason for this).
So what you have to do is call migrate like this
rake db:migrate RAILS_ENV=production <—- or whatever your environment is
That should get you back on the path to true happiness.
July 2nd, 2009