On Sunday, October 8, 2017 at 6:21:15 AM UTC-7, French Fry wrote:
>
> Database is working on local.
> Here is the main app file (relevant doe). 
>
>
> require 'sinatra'
> require 'slim'
> require 'sass'
> require 'sequel'
> require './song.rb'
>

I'm guessing this is the problem, you are loading a model file before 
creating your Sequel::Database object.  You need to move this after the 
configure blocks.
 

>
> require 'rake'
>
>
You probably don't want to load rake in your application file.
 

>
> configure :development do
>   password = ENV["PGPASSWORD"]
>   DB = Sequel.postgres('development', user: 'postgres', password: password
> , host: 'localhost')
>

Using the postgres database superuser to run your application is a very bad 
idea from a security perspective, even in development. Create at least one 
application-specific database account and use that.  It may also be a good 
idea to use a more descriptive database name.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to