aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #8731 from amatsuda/readme_dir_treeGuillermo Iguaran2013-01-031-11/+15
|\ | | | | update directory tree in the generated README
| * update directory tree in the generated READMEAkira Matsuda2013-01-041-11/+15
| |
* | Merge pull request #8705 from amparo-luna/change_update_attributes_to_updateGuillermo Iguaran2013-01-032-3/+3
|\ \ | |/ |/| Rename update_attributes method to update
| * Updating default application templates to use update instead of ↵Amparo Luna + Guillermo Iguaran2013-01-032-3/+3
| | | | | | | | update_attributes
* | test PATCH method for update action in generated scaffold controller test ↵Akira Matsuda2013-01-031-1/+1
| | | | | | | | rather than PUT
* | replace #flatten with Array()Gosha Arinich2013-01-021-2/+2
|/
* fix alignment in rails info properties page [ci skip]Vijay Dev2013-01-011-0/+2
|
* Add -B alias for --skip-bundleJiri Pospisil2013-01-011-1/+1
|
* Add active_support/testing/autorunRafael Mendonça França2012-12-312-2/+2
| | | | | minitest/autorun load minitest/spec polluting the global namespace with the DSL that we don't want on Rails
* Improve secret_token deprecation messageSantiago Pastorino2012-12-301-3/+4
|
* Revert "Install binstubs by default"Jeremy Kemper2012-12-281-1/+1
| | | | | | This reverts commit f34c27a452418d8aa17f92bb0fd7ae97b5f7e252. We'll be taking a different tack on this with new `bundle binstubs <gem>` support.
* Revert "Detect rbenv and update the shebang"Jeremy Kemper2012-12-281-8/+1
| | | | | This reverts commit 7173c4f931c9026bd3bc0b644d93dae744433f09. This reverts commit a562f9fa09967eba26dff1c3bc8aa85b6f0a72ff.
* Consistent punctuation for @jaroslawr :bowtie:Jeremy Kemper2012-12-271-1/+1
|
* Merge pull request #8616 from senny/8612_respect_yaml_keywordsRafael Mendonça França2012-12-262-4/+16
|\ | | | | quote column names in generated fixture files
| * quote column names in generated fixture filesYves Senn2012-12-262-4/+16
| |
* | Revert "Ignore /bin on new apps" -- given the move to default binstubs, we ↵David Heinemeier Hansson2012-12-261-4/+3
|/ | | | | | want you to check those in! This reverts commit 35c554f0bf518e1068e79002a462c3deba649e9b.
* Explicit options should have precedence over railsrc on the `rails new`Rafael Mendonça França2012-12-241-2/+1
| | | | | | command Closes #8545
* remove duplication from Rails::Application docsHrvoje Šimić2012-12-241-2/+0
|
* Fix spacing regression in scaffold generatorYehuda Katz2012-12-221-1/+3
|
* Fix syntax error in controller templateGuillermo Iguaran2012-12-221-4/+12
|
* Ignore /bin on new appsJosé Valim2012-12-221-3/+4
|
* Add --no-html to scaffold generatorYehuda Katz2012-12-223-8/+37
|
* Detect rbenv and update the shebangYehuda Katz2012-12-221-1/+8
|
* Install binstubs by defaultYehuda Katz2012-12-221-1/+1
|
* Move background jobs to the 'jobs' branch until fully baked. Not shipping ↵Jeremy Kemper2012-12-216-47/+2
| | | | with Rails 4.0.
* Revert "Make sure that RAILS_ENV is set when accessing Rails.env"Andy Lindeman2012-12-211-4/+1
| | | | | | | | This reverts commit b3125c89f42968bec6ee0b92ab93e36dbc36d5c3. * It is not desirable to set `ENV['RAILS_ENV']`; otherwise, it will leak through to rake tasks such as `rake test` or `rake spec`. See #7175 for more details.
* Integrate Journey into Action DispatchAndrew White2012-12-191-2/+0
| | | | | | | | Move the Journey code underneath the ActionDispatch namespace so that we don't pollute the global namespace with names that may be used for models. Fixes rails/journey#49.
* Revert "Merge pull request #7587 from elia/fix-too-eager-loading"Rafael Mendonça França2012-12-181-12/+6
| | | | | | | | | | This reverts commit 3663057518eb9acf9b1e72f47dcb07038e6b7368. REASON: This caused a regression that add app folder in the eager load path. See #8146 for more information. Conflicts: railties/CHANGELOG.md
* MergeDavid Heinemeier Hansson2012-12-182-3/+6
|\
| * Format routes as html on debug pageschneems2012-12-172-74/+5
| | | | | | | | | | | | | | | | | | When someone gets a routing exception, the routes are rendered (starting in Rails 4.0). This PR brings parity between the html routes in the `rails/info/routes` path and when rendered from an exception. This is the continuation of #8521 which brought html formatted routes. In addition to bringing parity to the two views, we're keeping our views DRY by rendering off of the same partials. In this case Railties depends on partials provided by ActionDispatch. I'm open to alternative implementations. Ideally both views will use the same code so any improvements or updates to it will be reproduced on both. <hr /> ![](http://f.cl.ly/items/3O1D0K1v0j0i343O3T3T/Screen%20Shot%202012-12-17%20at%203.07.20%20PM.png)
| * HTML formatting to Rails::InfoController#routesschneems2012-12-172-3/+75
| | | | | | | | | | | | | | | | | | | | This PR adds formatting and meta-data to the display of the internal routes. Users can now toggle between showing helpers with the `_path` or _`url` suffix. There are multiple ways to achieve this, this method uses partials for formatting and meta-data. The partials can be re-used when rendering `routing_error.erb`, though that will need to be in a separate PR. ![](http://f.cl.ly/items/3A2p3c1T1t2f2X2R2K2S/Screen%20Shot%202012-12-12%20at%202.28.01%20PM.png) ATP Railties
* | Add app/models/concerns and app/controllers/concerns to the default ↵David Heinemeier Hansson2012-12-182-0/+13
|/ | | | directory structure and load path
* 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.