aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
Commit message (Collapse)AuthorAgeFilesLines
* Remove blank lines from generated GemfileSam Ruby2012-12-151-2/+2
| | | | Introduced by 059bdc3415b0f1fb436c56a399a41b90fe3e87f0
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-12-152-9/+2
|\ | | | | | | | | | | Conflicts: actionpack/lib/action_view/helpers/form_helper.rb railties/lib/rails/info_controller.rb
| * copy editing [ci skip]Vijay Dev2012-12-151-1/+1
| |
| * Revert "Add quotes to Numeric Passwords to force string(sqlserver)"Vijay Dev2012-12-151-2/+0
| | | | | | | | This reverts commit d1e70cb7b410f5151b08af9b38b2d6d80c1c61c2.
| * Revert "Add quotes to Numeric Passwords to force string(jdbcmysql)"Vijay Dev2012-12-151-2/+0
| | | | | | | | This reverts commit 2f0311d79af01dc59ab3bd95cd6a56511258f917.
| * Revert "Add quotes to Numeric Passwords to force string(jdbcpostgresql)"Vijay Dev2012-12-151-2/+0
| | | | | | | | This reverts commit db9b619f2851d7aeef9b239f6c19d0076faf5909.
| * Revert "Add quotes to Numeric Passwords to force string(MySql)"Vijay Dev2012-12-151-2/+0
| | | | | | | | This reverts commit e5f8b2be64a74ce05e7c8b873d3e795e7bc68df5.
| * Revert "Add quotes to Numeric Passwords to force string(Postgres)"Vijay Dev2012-12-151-2/+0
| | | | | | | | | | | | This reverts commit 6e72099a382c9731c7b40aa1b10237318e31ac92. Reason: Feel that this isn't the right place.
| * Change method is default since rails 3.1 [ci skip]Gaurish Sharma2012-12-141-8/+1
| | | | | | | | | | | | Since Rails 3.1, change method is preferred for writing migrations. Updated the example, because that command would generate migration with change method.
| * Update railties/lib/rails/info_controller.rbRichard Schneeman2012-12-101-1/+1
| | | | | | # :nodoc: the rails/info_controller
| * Add quotes to Numeric Passwords to force string(sqlserver)Gaurish Sharma2012-12-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you have numeric password for your database, like below: ```yaml development: adapter: mysql2 encoding: utf8 database: myblog_development pool: 5 username: root password: 123456 ``` you will get the following obscure error with unhelpful stack-trace ```shell /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect': can't convert Fixnum into String (TypeError) from /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `initialize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:444:in `new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:454:in `checkout_new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:425:in `acquire_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:362:in `block in checkout' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `checkout' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:271:in `block in connection' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:270:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:545:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:79:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:53:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/railtie.rb:153:in `block in <class:Railtie>' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `instance_exec' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `run' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:55:in `block in run_initializers' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:54:in `run_initializers' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:216:in `initialize!' from /home/gaurish/code/repo/rails/railties/lib/rails/railtie/configurable.rb:30:in `method_missing' from /tmp/numericpass/config/environment.rb:5:in `<top (required)>' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require_environment!' from /home/gaurish/code/repo/rails/railties/lib/rails/commands.rb:70:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>' ``` Looking [Can't convert fixnum to string during rake db:create](http://stackoverflow.com/questions/3765834/cant-convert-fixnum-to-string-during-rake-dbcreate), it seems lot of people have faced the same error. so adding a note informing about numeric passwords seems like a good idea
| * Add quotes to Numeric Passwords to force string(jdbcmysql)Gaurish Sharma2012-12-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you have numeric password for your database, like below: ```yaml development: adapter: mysql2 encoding: utf8 database: myblog_development pool: 5 username: root password: 123456 ``` you will get the following obscure error with unhelpful stack-trace ```shell /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect': can't convert Fixnum into String (TypeError) from /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `initialize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:444:in `new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:454:in `checkout_new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:425:in `acquire_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:362:in `block in checkout' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `checkout' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:271:in `block in connection' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:270:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:545:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:79:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:53:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/railtie.rb:153:in `block in <class:Railtie>' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `instance_exec' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `run' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:55:in `block in run_initializers' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:54:in `run_initializers' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:216:in `initialize!' from /home/gaurish/code/repo/rails/railties/lib/rails/railtie/configurable.rb:30:in `method_missing' from /tmp/numericpass/config/environment.rb:5:in `<top (required)>' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require_environment!' from /home/gaurish/code/repo/rails/railties/lib/rails/commands.rb:70:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>' ``` Looking [Can't convert fixnum to string during rake db:create](http://stackoverflow.com/questions/3765834/cant-convert-fixnum-to-string-during-rake-dbcreate), it seems lot of people have faced the same error. so adding a note informing about numeric passwords seems like a good idea
| * Add quotes to Numeric Passwords to force string(jdbcpostgresql)Gaurish Sharma2012-12-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you have numeric password for your database, like below: ```yaml development: adapter: mysql2 encoding: utf8 database: myblog_development pool: 5 username: root password: 123456 ``` you will get the following obscure error with unhelpful stack-trace ```shell /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect': can't convert Fixnum into String (TypeError) from /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `initialize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:444:in `new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:454:in `checkout_new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:425:in `acquire_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:362:in `block in checkout' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `checkout' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:271:in `block in connection' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:270:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:545:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:79:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:53:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/railtie.rb:153:in `block in <class:Railtie>' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `instance_exec' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `run' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:55:in `block in run_initializers' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:54:in `run_initializers' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:216:in `initialize!' from /home/gaurish/code/repo/rails/railties/lib/rails/railtie/configurable.rb:30:in `method_missing' from /tmp/numericpass/config/environment.rb:5:in `<top (required)>' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require_environment!' from /home/gaurish/code/repo/rails/railties/lib/rails/commands.rb:70:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>' ``` Looking [Can't convert fixnum to string during rake db:create](http://stackoverflow.com/questions/3765834/cant-convert-fixnum-to-string-during-rake-dbcreate), it seems lot of people have faced the same error. so adding a note informing about numeric passwords seems like a good idea
| * Add quotes to Numeric Passwords to force string(MySql)Gaurish Sharma2012-12-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you have numeric password for your database, like below: ```yaml development: adapter: mysql2 encoding: utf8 database: myblog_development pool: 5 username: root password: 123456 ``` you will get the following obscure error with unhelpful stack-trace ```shell $ c /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect': can't convert Fixnum into String (TypeError) from /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `initialize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:444:in `new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:454:in `checkout_new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:425:in `acquire_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:362:in `block in checkout' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `checkout' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:271:in `block in connection' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:270:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:545:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:79:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:53:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/railtie.rb:153:in `block in <class:Railtie>' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `instance_exec' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `run' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:55:in `block in run_initializers' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:54:in `run_initializers' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:216:in `initialize!' from /home/gaurish/code/repo/rails/railties/lib/rails/railtie/configurable.rb:30:in `method_missing' from /tmp/numericpass/config/environment.rb:5:in `<top (required)>' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require_environment!' from /home/gaurish/code/repo/rails/railties/lib/rails/commands.rb:70:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>' ``` Looking [Can't convert fixnum to string during rake db:create](http://stackoverflow.com/questions/3765834/cant-convert-fixnum-to-string-during-rake-dbcreate), it seems lot of people have faced the same error. so adding a note informing about numeric passwords seems like a good idea
| * Add quotes to Numeric Passwords to force string(Postgres)Gaurish Sharma2012-12-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you have numeric password for your database, like below: ```yaml development: adapter: mysql2 encoding: utf8 database: myblog_development pool: 5 username: root password: 123456 ``` you will get the following obscure error with unhelpful stack-trace ```shell $ c /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect': can't convert Fixnum into String (TypeError) from /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `initialize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:444:in `new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:454:in `checkout_new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:425:in `acquire_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:362:in `block in checkout' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `checkout' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:271:in `block in connection' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:270:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:545:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:79:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:53:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/railtie.rb:153:in `block in <class:Railtie>' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `instance_exec' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `run' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:55:in `block in run_initializers' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:54:in `run_initializers' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:216:in `initialize!' from /home/gaurish/code/repo/rails/railties/lib/rails/railtie/configurable.rb:30:in `method_missing' from /tmp/numericpass/config/environment.rb:5:in `<top (required)>' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require_environment!' from /home/gaurish/code/repo/rails/railties/lib/rails/commands.rb:70:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>' ``` Looking [Can't convert fixnum to string during rake db:create](http://stackoverflow.com/questions/3765834/cant-convert-fixnum-to-string-during-rake-dbcreate), it seems lot of people have faced the same error. so adding a note informing about numeric passwords seems like a good idea
* | Revert "Merge pull request #8499 from schneems/schneems/html-route-inspector"Steve Klabnik2012-12-142-27/+2
| | | | | | | | | | | | | | This reverts commit ae68fc3864e99ab43c18fd12577744e1583f6b64, reversing changes made to 0262a18c7b0ab6f60fee842b3007388f9ffeb0fa. See here: https://github.com/rails/rails/pull/8499#issuecomment-11356417
* | Merge pull request #8499 from schneems/schneems/html-route-inspectorSteve Klabnik2012-12-132-2/+27
|\ \ | | | | | | Output routes in :html format
| * | Output routes in :html formatschneems2012-12-122-2/+27
| | | | | | | | | | | | | | | | | | By formatting routes for different media (txt/html) we can apply optimizations based on the format. We can include meta-data in the HTML to allow a rich experience while rendering and viewing the routes. This PR shows route helpers as they are used with the `_path` extension, it also has a javascript toggle on the top to switch to `_url`. This way the developer can see the exact named route helper they can use instead of having to modify a base. This is one example of an optimization that could be applied. Eventually we can link out to guides for the different columns to better explain what helper, HTTP Verb, Path, and Controller#action indicate. We could even add a route search box that could allow developers to input a given route and see all of the routes that match it. These are stand alone features and should be delivered separately.
* | | don't include debugger gem if jruby is used since it doesn't work on jruby.Teng Siong Ong2012-12-121-0/+2
|/ /
* | Explain how to supersede the new dynamic welcome pageGeorge Claghorn2012-12-111-0/+2
| | | | | | | | | | | | | | | | The old, static welcome page instructed developers to delete the public/index.html file and set a root route. The new, dynamic welcome page should tell developers (a) why they're seeing it when it doesn't correspond to anything in the viewable app source and (b) that it can be superseded with a root route.
* | Merge pull request #8468 from schneems/schneems/rack-index-pageSantiago Pastorino2012-12-107-11/+11
|\ \ | | | | | | Use Rails to Render Default Index Page
| * | Use Rails to Render Default Index Pageschneems2012-12-107-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an alternative implementation to #7771 thanks to the advice of @spastorino Rails is a dynamic framework that serves a static index.html by default. One of my first questions ever on IRC was solved by simply deleting my public/index.html file. This file is a source of confusion when starting as it over-rides any set "root" in the routes yet it itself is not listed in the routes. By making the page dynamic by default we can eliminate this confusion. This PR moves the static index page to an internal controller/route/view similar to `rails/info`. When someone starts a rails server, if no root is defined, this route will take over and the "dynamic" index page from rails/welcome_controller will be rendered. These routes are only added in development. If a developer defines a root in their routes, it automatically takes precedence over this route and will be rendered, with no deleting of files required. In addition to removing this source of confusion for new devs, we can now use Rails view helpers to build and render this page. While not the primary intent, the added value of "dogfooding" should not be under-estimated. The prior PR #7771 had push-back since it introduced developer facing files. This PR solves all of the same problems, but does not have any new developer facing files (it actually removes one). cc/ @wsouto, @dickeyxxx, @tyre, @ryanb, @josevalim, @maxim, @subdigital, @steveklabnik ATP Railties and Actionpack.
* | | Make sure that no extra spaces are created with a non-polymorphicRafael Mendonça França2012-12-101-2/+6
| | | | | | | | | | | | attributes
* | | Merge branch 'scaffold_fixes'Rafael Mendonça França2012-12-105-14/+22
|\ \ \
| * | | Add GeneratedAttribute#column_name to get the name of the column in theRafael Mendonça França2012-12-103-6/+10
| | | | | | | | | | | | | | | | database
| * | | Extract a attributes_names method to avoid duplicationRafael Mendonça França2012-12-104-22/+12
| | | |
| * | | Deal with polymorphic attributes correctly in the generatorsRafael Mendonça França2012-12-104-7/+24
| | | |
| * | | Make references and belongs_to attributes to generate the _id column inRafael Mendonça França2012-12-101-2/+2
| | | | | | | | | | | | | | | | fixtures
| * | | Put the reference and belongs_to attributes in the scaffold tests.Rafael Mendonça França2012-12-101-6/+3
| | | |
| * | | Use the references and belongs_id ids in the scaffold_controllerRafael Mendonça França2012-12-091-1/+1
| |/ / | | | | | | | | | generator
* | | Merge pull request #8472 from schneems/schneems/expand_pathRafael Mendonça França2012-12-091-1/+1
|\ \ \ | |/ / |/| | Use `File.expand_path` instead of `File.join`
| * | Use `File.expand_path` instead of `File.join`schneems2012-12-091-1/+1
| | | | | | | | | cc/ @carlosantoniodasilva
* | | Remove the spaces after the open bracket and before the close bracket.Rafael Mendonça França2012-12-091-1/+1
| | | | | | | | | | | | All our generated code follow this rule
* | | Make code statistics rake task handle new test locations properlyGeorge Claghorn2012-12-091-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of 2a68f68aead9fd65ecac8062ca8efc15f5bab418: - Unit tests are now in test/models, instead of test/units - Functional tests are now in test/controllers, instead of test/functional - Helper tests are now in test/helpers, instead of test/units/helpers - Mailer tests are now in test/mailers, instead of test/functional Update the rake task for code statistics (`rake stats`) so that it recognizes files in the above locations as tests, and accurately calculates statistics such as "Test LOC" and "Code to Test Ratio." Safely handle Rails apps that still have tests in the old locations.
* | | Fix method assertion ensuring it will match "end" with the same indentationCarlos Antonio da Silva2012-12-081-2/+2
| |/ |/| | | | | | | Otherwise it was matching "end" lines from blocks within the method body, making tests such as the migration ones fail.
* | Merge pull request #8461 from frodsan/fix_assert_method_generatorsCarlos Antonio da Silva2012-12-081-1/+1
|\ \ | | | | | | Fix #assert_instance_method to also assert indented methods
| * | Fix #assert_instance_method to also assert indented methodsFrancesco Rodriguez2012-12-081-1/+1
| | |
* | | Merge pull request #8395 from bmaland/attr_accessorsCarlos Antonio da Silva2012-12-081-23/+1
|\ \ \ | | | | | | | | Use attr_accessor for Rails.{application,cache,logger}
| * | | Use attr_accessor for Rails.{application,cache,logger}Bjørn Arild Mæland2012-12-011-23/+1
| | | |
* | | | use :only instead of :except callback option in the controller templateFrancesco Rodriguez2012-12-071-3/+2
| |/ / |/| | | | | | | | | | | | | | As [Security Guide](http://edgeguides.rubyonrails.org/security.html#whitelists-versus-blacklists) says, it's better to use `before_filter only: []` instead of `except: []` so we don't forget to turn the filter off for newly added actions.
* | | Let the scaffold example use the "set shared record" pattern to explain ↵David Heinemeier Hansson2012-12-071-6/+7
| |/ |/| | | | | callbacks
* | Revert turbolinks load order requirementNick Reed2012-12-051-3/+1
| |
* | Add ENV['RACK_ENV'] support to rake runner/console/server.kennyj2012-12-063-3/+3
| |
* | Merge pull request #8404 from freegenie/filter_redirectsAndrew White2012-12-052-1/+4
|\ \
| * | Adding filter capability to ActionController logsFabrizio Regini2012-12-052-1/+4
| | |
* | | Replace comments' non-breaking spaces with spacesclaudiob2012-12-042-2/+2
|/ / | | | | | | | | | | | | | | | | | | Sometimes, on Mac OS X, programmers accidentally press Option+Space rather than just Space and don’t see the difference. The problem is that Option+Space writes a non-breaking space (0XA0) rather than a normal space (0x20). This commit removes all the non-breaking spaces inadvertently introduced in the comments of the code.
* | Track the default application.css/js files for turbolinks as per version 0.6.0David Heinemeier Hansson2012-12-041-2/+2
| |
* | Locate `=require turbolinks` at the bottom of application.jsYasuharu Ozaki2012-12-041-1/+3
| | | | | | | | | | Turbolinks should be located at the bottom of application.js to detect assets change properly.
* | Fix wrong doc and message about rails profiler.kennyj2012-12-041-1/+1
| |
* | Merge pull request #8394 from acangiano/add_db_folder_to_annotationsRafael Mendonça França2012-12-011-1/+1
|\ \ | | | | | | Add db to the list of default annotation folders