| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Executable scripts are versioned code like the rest of your app. To generate a stub for a bundled gem: 'bundle binstubs unicorn' and 'git add bin/unicorn'
|
|
|
|
|
|
|
|
| |
Avoid swallowing all exceptions that might happen when requiring
debugger, just catch a LoadError if it cannot be loaded.
Check for more background:
https://github.com/rails/rails/commit/28fd867c9bc790636d37a28f288791cd0089a6fd#commitcomment-2386952
|
| |
|
| |
|
|
|
|
|
| |
This method doesn't need to be in the class, since it's only used only
from the instance.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow environment name to start with a substring of the default
environment names.
For example: tes, pro, prod, dev, devel, etc.
Fixing identation.
Adding test for Rails::Console.parse_arguments method.
Fix issue 8628 for Rails::DBConsole.
|
|
|
|
|
|
| |
command
Closes #8545
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
by Active Support)
Selecting which key extensions to include in active_support/rails
made apparent the systematic usage of Object#in? in the code base.
After some discussion in
https://github.com/rails/rails/commit/5ea6b0df9a36d033f21b52049426257a4637028d
we decided to remove it and use plain Ruby, which seems enough
for this particular idiom.
In this commit the refactor has been made case by case. Sometimes
include? is the natural alternative, others a simple || is the
way you actually spell the condition in your head, others a case
statement seems more appropriate. I have chosen the one I liked
the most in each case.
|
| |
|
|
|
|
| |
Allow hyphens in environment names again.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Ruby tries to use '-h' as short version of '--header' by default
https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L1372-1381.
To force `rails db -h` prints an usage message we should add the `-h`
options explicitly.
|
|
|
|
|
|
|
|
|
|
| |
Rails uses sqlit3 db file with a path relative to the rails root. It
allows to execute server not from rails root only. For example you
can fire `./spec/dummy/script/rails s` to start dummy application
server if you develop some engine gem.
Now the `rails db` command uses relative paths also and you can explore
your dummy db via `./spec/dummy/script/rails db` command.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
rails server takes `-e` as an argument to specify RAILS_ENV, rails console currently does not have the same interface. This commit fixes this disparity so developers can manually specify `RAILS_ENV` or can pass in an environment with a `-e`.
|
|
|
|
|
|
|
| |
When launching rails server from the command line with a rails environment specified such as `rails server RAILS_ENV=production` an error would occur since rails will try to use `RAILS_ENV=production` as it's server.
When launching rails with a specified server such as thin `rails server thin RAILS_ENV=production` no error will be thrown, but rails will not start up in the specified environment.
This fixes both of those cases
|
|
|
|
| |
production so that PID and timestamp are logged. fixes #5388
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds ability to set custom console if you want to use
something other than IRB. Previously the hack that people used
was:
silence_warnings do
require 'pry'
IRB = Pry
end
which is not the best way to customize things.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This is done since the -h option to dbconsole hides the conventional
-h for help and forces users to use --help to see the usage options for
dbconsole.
|
| |
|
|
|
|
|
|
| |
This is to avoid a conflict that occurs when you add Rake to
your Gemfile. There is a Commands Object in Rake that conflicts
with the Commands module in plugin.rb. See rails issue #1866.
|
|
|
|
| |
Rails::Application
|