| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|\
| |
| | |
Fix #assert_instance_method to also assert indented methods
|
| | |
|
|\ \
| | |
| | | |
Use attr_accessor for Rails.{application,cache,logger}
|
| | | |
|
| | | |
|
| |/
|/|
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
callbacks
|
| |
| |
| |
| | |
This reverts commit c59734f756b79c39486c45273d2cc5d42cd0c864.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before:
Finished tests in 56.245787s, 0.2133 tests/s, 0.0000 assertions/s.
12 tests, 0 assertions, 0 failures, 0 errors, 0 skips
After:
Finished tests in 42.401416s, 0.2830 tests/s, 0.0000 assertions/s.
12 tests, 0 assertions, 0 failures, 0 errors, 0 skips
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit inverts the precedence in ActionDispatch::Static so that
dynamic content will be served before static content. This is so that
precompiled assets do not inadvertently get included when running in
development mode - it should have no effect in production where static
files are usually handled by the web server.
Closes #6421
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This cleanup aims to fix a build failure:
https://travis-ci.org/rails/rails/jobs/3515951/#L482
Since travis always have both ENV vars set to "test", a test is failing
where it's expected to output the default env "development", but "test"
is the result due to RACK_ENV being set when we expect it to not be.
By cleaning this duplication we ensure that changing any of these env
variables will pick the right expected value.
|
| | |
|
| |
| |
| |
| | |
[ci skip]
|
| | |
|
|\ \ |
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| | |
Turbolinks should be located at the bottom of application.js
to detect assets change properly.
|
| | |
|
| |
| |
| |
| | |
Related to changes introduced in 553b563749517114323b4e8742509227e0daab67
|
|\ \
| | |
| | | |
Add db to the list of default annotation folders
|
| |/ |
|
|/
|
|
|
| |
This will put ~/ in .gitconfig so it will not be hardcoded to the home
directory where the command was run.
|
| |
|
|
|
|
|
|
|
|
| |
They was extracted from a plugin.
See https://github.com/rails/rails-observers
[Rafael Mendonça França + Steve Klabnik]
|
|
|
|
|
|
|
|
|
| |
This reverts commit 33b29e0112db62d3a8c798bb58f51c0a839d9e26, reversing
changes made to ac8c729342e6b020a57d0d6887c8a8d5b39f96e0.
Reason:
https://github.com/rails/rails/pull/4684#commitcomment-920313
|
|
|
|
|
|
| |
* I guess this would be the preferrable default for Bundler
* current version of Bundler converts :rubygems into 'http://rubygems.org', not https://,
and that will help those who are working on a very poor network environment that doesn't allow SSL
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Provides a better error message incase the database.yaml
has some errors.
|
|\
| |
| | |
require bundler groups to include rake-tasks in engines
|
| |
| |
| |
| |
| |
| |
| |
| | |
If you generate a full engine, this will include rake tasks from
your gem under the `app` namespace. For example if you have a dependency
on `rspec-rails` in your engine's `gemspec`. You will get the task `app:spec`
Closes #8229
|
| | |
|
| |
| |
| |
| |
| |
| | |
Remove not used variable.
Remove config attr_reader causing warning.
Fix indent in runner file.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using sqlite3 it was attempting to find the database file based on
Rails.root, the problem is that Rails.root is not always present because
we try to first manually load "config/database.yml" instead of loading
the entire app, to make "rails db" faster.
This means that when we're in the root path of the app, calling "rails db"
won't allow us to use Rails.root, making the command fail for sqlite3
with the error:
./rails/commands/dbconsole.rb:62:in `start':
undefined method `root' for Rails:Module (NoMethodError)
The fix is to simply not pass any dir string to File.expand_path, which
will make it use the current directory of the process as base, or the
root path of the app, which is what we want.
When we are in any other subdirectory, calling "rails db" should work
just fine, because "config/database.yml" won't be found, thus "rails db"
will fallback to loading the app, making Rails.root available.
Closes #8257.
|
|
|
|
| |
invocations of "rails new".
|
|\
| |
| |
| |
| | |
Conflicts:
actionpack/lib/action_dispatch/routing/redirection.rb
|
| | |
|
| |
| |
| |
| | |
config.assets.precompile
|
| |
| |
| |
| |
| |
| | |
This allows easy upgrading from the old signed Cookie Store <= 3.2
or the deprecated one in 4.0 (the ones that doesn't use key derivation)
to the new one that signs using key derivation
|
| | |
|
| | |
|
| |
| |
| |
| | |
Closes #8232 [ci skip]
|
|\ \
| | |
| | | |
Encrypted cookies
|
| | | |
|