| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
like DataMapper and Sequel
[#6180 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
|
|
|
|
| |
[#6293 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
| |
|
| |
|
|
|
|
|
|
| |
[#4532 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
|
|
| |
[#3999 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
|
|
| |
<username>[/<password>][@<connect_identifier>])
[#3773 state:resolved]
|
|
|
|
| |
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
|
|
|
|
| |
for script/console and script/dbconsole
|
| |
|
| |
|
|
|
|
| |
application's object root)
|
|
|