Posts Tagged ‘ruby’
Protected: Ruby on Rails 3.1.x application Deployment on Heroku
Posted by firstruby on September 1, 2011
Posted in Useful Links | Tagged: deployment, heroku, rails 3.1, ruby | Enter your password to view comments.
Mysql::Error: query: not connected while rake db:migrate
Posted by firstruby on August 25, 2011
With Ruby 1.9.2 and Rails 3.0.10,
If you are facing following problem while doing “rake db:migrate”,
Mysql::Error: query: not connected: SHOW TABLES
then you may need to download ‘libmySQL’ from http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dll and paste that in C:\Ruby192\bin folder.
Posted in Useful Links | Tagged: migrate, migration, mysql, rails, ruby | Leave a Comment »
HTTP authentication for Ruby on Rails application
Posted by firstruby on June 23, 2011
You may want to add HTTP authentication to your Ruby on Rails site, add following to your application controller file,
before_filter :authenticate
protected
def authenticate
authenticate_or_request_with_http_basic do |username, password|
username == "test" && password == "test"
end
end
After adding these lines, application will ask for username and password.
Posted in Useful Links | Tagged: authentication, HTTP authentication, rails, ruby | Leave a Comment »
Protected: Ruby on Rails 3.0.x application Deployment on Heroku
Posted by firstruby on March 17, 2011
Posted in Useful Links | Tagged: deployment, heroku, rails 3.0.x, ruby | Enter your password to view comments.
select with :onchange in Ruby on Rails
Posted by firstruby on November 2, 2008
In Ruby on Rails, We can use ‘select’ with
nchange as following code block,
= f.select :my_attribute, @my_values.collect{|a| [a.name, a.id]}, {}, {
nChange => 'remote_function(blabla....)' }
Posted in firstruby | Tagged: onchange, rails, ruby, select | Leave a Comment »