Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Could not find "config/databases/sqlserver.yml" in any of your source paths #6882

sgonyea opened this Issue · 18 comments

5 participants

Scott Gonyea Steve Klabnik Richard Schneeman Robert Nesius Rafael Mendonça França
Scott Gonyea

It seems that the sqlserver database configuration has vanished? Running the following under jruby (though I don't think the ruby matters), on rails 3.2.6:

rails new foo -d sqlserver

Yields the following output:

rails new foo -d sqlserver      create  
      create  README.rdoc
      create  Rakefile
      create  .gitignore
      create  Gemfile
      create  app
      create  app/assets/images/rails.png
      create  app/assets/javascripts/application.js
      create  app/assets/stylesheets/application.css
      create  app/controllers/application_controller.rb
      create  app/helpers/application_helper.rb
      create  app/mailers
      create  app/models
      create  app/views/layouts/application.html.erb
      create  app/mailers/.gitkeep
      create  app/models/.gitkeep
      create  config
      create  config/routes.rb
      create  config/application.rb
      create  config/environment.rb
      create  config/environments
      create  config/environments/development.rb
      create  config/environments/production.rb
      create  config/environments/test.rb
      create  config/initializers
      create  config/initializers/backtrace_silencers.rb
      create  config/initializers/inflections.rb
      create  config/initializers/mime_types.rb
      create  config/initializers/secret_token.rb
      create  config/initializers/session_store.rb
      create  config/initializers/wrap_parameters.rb
      create  config/locales
      create  config/locales/en.yml
      create  config/boot.rb
Could not find "config/databases/sqlserver.yml" in any of your source paths. Your current source paths are: 
Steve Klabnik

Can you show me the output of ls? I have a hunch that it's either a dup or related to #6010 and or #6868.

Scott Gonyea

You're fast. I tested this in ruby 1.9.3 and jruby (with --1.9). I also hit this issue with both rails 3.1.6 and 3.2.6.

My pwd is /usr/local/share/workspace

and cd foo && ls -al yields:

sgonyea@s:/usr/local/share/workspace/foo$ ls -al
total 28
drwxr-xr-x+   9 sgonyea tc-dev  306 Jun 27 12:58 .
drwxrwxr-x+ 108 dev     tc-dev 3672 Jun 27 12:58 ..
-rw-r--r--+   1 sgonyea tc-dev  430 Jun 27 12:58 .gitignore
-rw-r--r--+   1 sgonyea tc-dev  785 Jun 27 12:58 Gemfile
-rw-r--r--+   1 sgonyea tc-dev 9208 Jun 27 12:58 README.rdoc
-rw-r--r--+   1 sgonyea tc-dev  268 Jun 27 12:58 Rakefile
drwxr-xr-x+   8 sgonyea tc-dev  272 Jun 27 12:58 app
drwxr-xr-x+   9 sgonyea tc-dev  306 Jun 27 12:58 config
-rw-r--r--+   1 sgonyea tc-dev  153 Jun 27 12:58
Scott Gonyea

I don't think this has anything to do with those other issues. It looks like the way in which generators happen got shuffled around, and this either was dropped or never accounted for.

The file is just not there:

sgonyea@s:/usr/local/share/workspace/foo$ l /Users/sgonyea/.rbenv/versions/jruby-
total 40K
drwxr-xr-x+ 12 sgonyea tc-dev  408 Jun 19 21:41 ./
drwxr-xr-x+ 10 sgonyea tc-dev  340 Jun 19 21:41 ../
-rw-r--r--+  1 sgonyea tc-dev  713 Jun 19 21:41 frontbase.yml
-rw-r--r--+  1 sgonyea tc-dev 2.1K Jun 19 21:41 ibm_db.yml
-rw-r--r--+  1 sgonyea tc-dev 1.8K Jun 19 21:41 jdbc.yml
-rw-r--r--+  1 sgonyea tc-dev  830 Jun 19 21:41 jdbcmysql.yml
-rw-r--r--+  1 sgonyea tc-dev 1.3K Jun 19 21:41 jdbcpostgresql.yml
-rw-r--r--+  1 sgonyea tc-dev  513 Jun 19 21:41 jdbcsqlite3.yml
-rw-r--r--+  1 sgonyea tc-dev 1.2K Jun 19 21:41 mysql.yml
-rw-r--r--+  1 sgonyea tc-dev 1.1K Jun 19 21:41 oracle.yml
-rw-r--r--+  1 sgonyea tc-dev 1.5K Jun 19 21:41 postgresql.yml
-rw-r--r--+  1 sgonyea tc-dev  576 Jun 19 21:41 sqlite3.yml
Steve Klabnik

You're fast

I happened to have my email open when you filed the bug. ;)

Thanks for taking the time to delve in a bit deeper.

Scott Gonyea

I'll make a pull request to add it.

Scott Gonyea

This will take a bit of time to work on. Should I just focus on JDBC sqlserver, since that's all I care about, or should I try to cover the driver you'd use with MRI? (I have doubts it'd work with Rubinius, but I could test that as well.)

Richard Schneeman

ping, have you had a chance to make a PR for this? If doing all of them is too much work just sqlserver would be fine. If you're not going to work on a PR, can you let us know and we can close this issue or have someone else potentially work on it?

Robert Nesius

5 months later - using latest stable rails the problem persists...

Could not find "config/databases/sqlserver.yml" in any of your source paths. Your current source paths are:

If 'rails new --help' advertises sqlserver as an option (which it does), it should work?

ls /usr/local/rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.9/lib/rails/generators/rails/app/templates/config/databases/
frontbase.yml jdbcmysql.yml jdbcsqlite3.yml mysql.yml postgresql.yml
ibm_db.yml jdbcpostgresql.yml jdbc.yml oracle.yml sqlite3.yml

Richard Schneeman

@rnesius yes, it should. Would you care to work on this? @sgonyea does not appear to be working on this issue.

Robert Nesius

I'm no the most git-savvy person out there, but it looks like it's just a matter of building out a reasonable template and submitting a pull request? I can probably do that.

Steve Klabnik

I'm not the most AR-savvy person, but yes, I think so.

Before submitting your pull request, you can test it out with your app by doing this:

Robert Nesius

Thanks for the tip. I'll take a crack at it.

Robert Nesius

I have successfully implemented/tested a fix. Reading online guides now to get a proper pull request submitted. It has taken me longer to jump through hoops with git and read submission guides than to do the fix.

Rafael Mendonça França

Closed by #8247

Steve Klabnik

It has taken me longer to jump through hoops with git and read submission guides than to do the fix.

At the very least, it's a one-time cost. Now you can visit this page every time you get another commit in. :)

Robert Nesius

Hah! Thanks Steve! :) One more commit and I'm in the top 800! ;-)

Steve Klabnik

Yep! It's a quick and steady rise at first...

Richard Schneeman

Thanks @rnesius many people open bugs on AR, few bother to submit PRs, your work is appreciated. :heart:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.