Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Allow apps that don't use a DB #60

wants to merge 1 commit into from

3 participants


The current build pack blows up in this case. If you are running a simple rack app without a database an error is raised. The error is raised by this code:

  uri = URI.parse(ENV["DATABASE_URL"])
rescue URI::InvalidURIError
  raise "Invalid DATABASE_URL"

This commit introduces a simple guard.


@hone can you take a look at this when you get a chance?


Hey @twinturbo, can you confirm this is still an issue? I created a Sinatra app recently with no database and no errors


@ctshryock ya it's still happening. Perhaps @schneems can merge this :)


@ahawkins is this still an issue? I create simple rack apps without a db often. Can you provide a repro? I think was caused by the other issue by wrong ruby/rack/rails detection.


Awesome, thanks!

@hone hone closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 13, 2013
  1. Allow apps that don't use a DB

    twinturbo authored
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/language_pack/ruby.rb
4 lib/language_pack/ruby.rb
@@ -447,8 +447,10 @@ def syck_hack
# writes ERB based database.yml for Rails. The database.yml uses the DATABASE_URL from the environment during runtime.
def create_database_yml
+ return unless ENV['DATABASE_URL']
+ return unless"config")
log("create_database_yml") do
- return unless"config")
topic("Writing config/database.yml to read from DATABASE_URL")"config/database.yml", "w") do |file|
file.puts <<-DATABASE_YML
Something went wrong with that request. Please try again.