Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix rails db command with sqlite3 database | Carlos Antonio da Silva | 2012-11-18 | 1 | -0/+8 |
| | | | | | | | | | | | | | | | | | | | | | | | | 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. | ||||
* | Set RACK_ENV to nil in the dbconsole test | Rafael Mendonça França | 2012-05-30 | 1 | -0/+1 |
| | | | | This will fix the travis-ci build | ||||
* | Fix various bugs with console arguments. | Sam Oliver | 2012-05-30 | 1 | -10/+11 |
| | | | | Allow hyphens in environment names again. | ||||
* | More assert_match warnings fixed. | Arun Agrawal | 2012-05-30 | 1 | -4/+4 |
| | |||||
* | Fix `rails db -h` and cosmetic fixes in usage banners | Alexey Vakhov | 2012-05-22 | 1 | -0/+18 |
| | | | | | | | 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` command | Alexey Vakhov | 2012-05-22 | 1 | -6/+11 |
| | | | | | | | | | | 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. | ||||
* | Fix build | Piotr Sarnacki | 2012-05-06 | 1 | -7/+10 |
| | |||||
* | More faster rails dbconsole | Dmitry Vorotilin | 2012-05-06 | 1 | -28/+57 |
| | |||||
* | Add Rails::DBConsole tests | Alexey Vakhov | 2012-05-02 | 1 | -0/+128 |