You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit from @numbata introduced a new syntax for getting the remote login data: 8808d0f
I have two projects that use this gem, updated both on the same day, same server environment (ruby 2.3.0), same server, etc...
One of the projects works fine.
The second project throws an error saying:
NoMethodError: undefined method `[]' for nil:NilClass
capistrano-db-tasks/lib/capistrano-db-tasks/database.rb:115:in `block (2 levels) in initialize'
If a put a breakpoint on that line and inspect the content of dirty_config_content, I see:
"Usage:\r\n rails new APP_PATH [options]\r\n\r\nOptions:\r\n -r, [--ruby=PATH] # Path to the Ruby binary of your choice\r\n # Default: ~/.rbenv/versions/2.3.0/bin/ruby\r\n -m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL)\r\n [--skip-gemfile], [--no-skip-gemfile] # Don't create a Gemfile\r\n -B, [--skip-bundle], [--no-skip-bundle] # Don't run bundle install\r\n -G, [--skip-git], [--no-skip-git] # Skip .gitignore file\r\n [--skip-keeps], [--no-skip-keeps] # Skip source control .keep files\r\n -O, [--skip-active-record], [--no-skip-active-record] # Skip Active Record files\r\n -S, [--skip-sprockets], [--no-skip-sprockets] # Skip Sprockets files\r\n [--skip-spring], [--no-skip-spring] # Don't install Spring application preloader\r\n -d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)\r\n # Default: sqlite3\r\n -j, [--javascript=JAVASCRIPT] # Preconfigure for selected JavaScript library\r\n # Default: jquery\r\n -J, [--skip-javascript], [--no-skip-javascript] # Skip JavaScript files\r\n [--dev], [--no-dev] # Setup the application with Gemfile pointing to your Rails checkout\r\n [--edge], [--no-edge] # Setup the application with Gemfile pointing to Rails repository\r\n [--skip-turbolinks], [--no-skip-turbolinks] # Skip turbolinks gem\r\n -T, [--skip-test-unit], [--no-skip-test-unit] # Skip Test::Unit files\r\n [--rc=RC] # Path to file containing extra configuration options for rails command\r\n [--no-rc], [--no-no-rc] # Skip loading of extra configuration options from .railsrc file\r\n\r\nRuntime options:\r\n -f, [--force] # Overwrite files that already exist\r\n -p, [--pretend], [--no-pretend] # Run but do not make any changes\r\n -q, [--quiet], [--no-quiet] # Suppress status output\r\n -s, [--skip], [--no-skip] # Skip files that already exist\r\n\r\nRails options:\r\n -h, [--help], [--no-help] # Show this help message and quit\r\n -v, [--version], [--no-version] # Show Rails version number and quit\r\n\r\nDescription:\r\n The 'rails new' command creates a new Rails application with a default\r\n directory structure and configuration at the path you specify.\r\n\r\n You can specify extra command-line arguments to be used every time\r\n 'rails new' runs in the .railsrc configuration file in your home directory.\r\n\r\n Note that the arguments specified in the .railsrc file don't affect the\r\n defaults values shown above in this help message.\r\n\r\nExample:\r\n rails new ~/Code/Ruby/weblog\r\n\r\n This generates a skeletal Rails installation in ~/Code/Ruby/weblog.\r\n See the README in the newly created application to get going."
If I put the same breakpoint in and output the contents of that variable in my other project, i can see there's a line with the following syntax at the beginning:
If I take the old syntax from the commit above and put that in my console where I've got the breakpoint, I get:
"development:\r\n adapter: mysql2\r\n encoding: utf8\r\n database: DATABASE\r\n username: USERNAME\r\n password: PASSWORD\r\n\r\n# Warning: The database defined as \"test\" will be erased and\r\n# re-generated from your development database when you run \"rake\".\r\n# Do not set this db to the same as development or production.\r\ntest:\r\n adapter: mysql2\r\n encoding: utf8\r\n database: DATABASE\r\n username: USERNAME\r\n password: PASSWORD\r\n\r\nstaging:\r\n adapter: mysql2\r\n encoding: utf8\r\n database: DATABASE\r\n username: USERNAME\r\n password: PASSWORD\r\n\r\nproduction:\r\n adapter: mysql2\r\n encoding: utf8\r\n database: DATABASE\r\n username: USERNAME\r\n password: PASSWORD\r\n host: DATABASE_HOST"
And the next line from the old code appears to properly set the @config var:
This commit from @numbata introduced a new syntax for getting the remote login data: 8808d0f
I have two projects that use this gem, updated both on the same day, same server environment (ruby 2.3.0), same server, etc...
One of the projects works fine.
The second project throws an error saying:
If a put a breakpoint on that line and inspect the content of
dirty_config_content
, I see:If I put the same breakpoint in and output the contents of that variable in my other project, i can see there's a line with the following syntax at the beginning:
If I take the old syntax from the commit above and put that in my console where I've got the breakpoint, I get:
And the next line from the old code appears to properly set the
@config
var:I can't really explain why, but I can definitely say that this new syntax is causing a really weird error using the latest version.
The text was updated successfully, but these errors were encountered: