aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/dbconsole.rb
Commit message (Collapse)AuthorAgeFilesLines
* Don't use Rails.root since it is not available at this pointRafael Mendonça França2013-01-051-1/+1
|
* Move class method to instance in dbconsoleCarlos Antonio da Silva2013-01-041-2/+2
| | | | | This method doesn't need to be in the class, since it's only used only from the instance.
* This commit fixes issue #8628Mykola Kyryk2013-01-041-1/+9
| | | | | | | | | | | | 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.
* Refactor config abort message a bit for dbconsoleCarlos Antonio da Silva2012-11-181-7/+3
| | | | | | Remove not used variable. Remove config attr_reader causing warning. Fix indent in runner file.
* Fix rails db command with sqlite3 databaseCarlos Antonio da Silva2012-11-181-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Removing warning : assigned but unused variableArun Agrawal2012-11-101-1/+1
|
* Support MySQL SSL in rails dbconsole.needfeed2012-09-101-1/+6
|
* Fix various bugs with console arguments.Sam Oliver2012-05-301-62/+75
| | | | Allow hyphens in environment names again.
* Fix `rails db -h` and cosmetic fixes in usage bannersAlexey Vakhov2012-05-221-1/+6
| | | | | | | 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.
* Use relative path to sqlite3 db in `rails db` commandAlexey Vakhov2012-05-221-1/+1
| | | | | | | | | | 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.
* More faster rails dbconsoleDmitry Vorotilin2012-05-061-10/+28
|
* Add Rails::DBConsole testsAlexey Vakhov2012-05-021-22/+34
|
* No need to require psych since require yaml does that.Rafael Mendonça França2012-01-041-1/+0
|
* No need to use rescue block to require psychRafael Mendonça França2012-01-041-6/+1
|
* dbconsole: Use the app's database_configuration instead of duplicating code.Dieter Komendera2011-12-141-1/+1
|
* Remove the -h option to dbconsole which is the shorter form of --headerVijay Dev2011-11-221-1/+1
| | | | | | 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.
* Corrected dbconsole usage message.2011-04-121-1/+1
|
* Accept 'postgres' as a PostgreSQL driver name in dbconsole for non-AR ORMs ↵Akira Matsuda2011-02-011-1/+1
| | | | | | | | like DataMapper and Sequel [#6180 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* "rails dbconsole t" must not load "production" but "test"Akira Matsuda2011-01-311-1/+1
| | | | | | [#6293 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* load and prefer psych as the YAML parser when it is availableAaron Patterson2011-01-211-0/+6
|
* Config is deprecated on 1.8.8 and 1.9.3 use RbConfigSantiago Pastorino2010-08-231-1/+1
|
* add support for mysql2 adapter to dbconsoleBrian Lopez2010-05-041-2/+2
| | | | | | [#4532 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Make db console work for all versions of ruby on Windows.unknown2010-04-261-1/+2
| | | | | | [#3999 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Make script/dbconsole work with oracle (sqlplus ↵Edgars Beigarts2010-03-261-0/+12
| | | | | | <username>[/<password>][@<connect_identifier>]) [#3773 state:resolved]
* Make script/dbconsole work again [#3690 state:resolved]Sam Granieri2010-01-161-2/+2
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Get everyone running on Rails.env and fix the broken environment settings ↵David Heinemeier Hansson2010-01-111-1/+5
| | | | for script/console and script/dbconsole
* Have script/* and Rakefile use the application objectCarlhuda2009-11-241-3/+7
|
* Refactor script/dbconsole into an objectCarlhuda2009-11-241-80/+89
|
* Deprecate RAILS_ROOT in favor of Rails.root (which proxies to the ↵Carl Lerche2009-10-161-1/+1
| | | | application's object root)
* Move railties/lib/* into railties/lib/*Yehuda Katz + Carl Lerche2009-09-241-0/+87