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
Sorry if this report is not great and my apologies if I will not comment/reply to it in time; I am quite chaotic.
I will try to make the bug report as useful as possible.
There actually is not much to it:
I started with gem install hanami. All worked fine.
I then went to the official documentation and did:
hanami new bookshelf --database=postgresql
This worked too.
I cd-ed into bookshelf/ and then did:
bundle install
This also worked fine.
I then did:
bundle exec hanami server
The result was:
[2019-05-04 14:33:13] INFO WEBrick 1.4.2
[2019-05-04 14:33:13] INFO ruby 2.6.3 (2019-04-16) [x86_64-linux]
[2019-05-04 14:33:13] INFO WEBrick::HTTPServer#start: pid=22658 port=2300
From that information I inferred that I should use localhost:2300 (I knew a bit of
sinatra prior to hanami)
I visited that in my browser and got an error:
Boot Error
Something went wrong while loading /Users/x/DATA/bookshelf/config.ru
Hanami::Model::Error: PG::ConnectionBad: could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
Hanami::Model::Error: PG::ConnectionBad: could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
What is most confusing to me is ... the commandline said I should use port 2300 and
the URL I use is:
So I don't know why the error message reports port 5432.
Anyway I hope this is somewhat useful to you - perhaps the error message can be found in this strange port 5432 reporting, since that is not consistent with the port shown on the commandline.
Hopefully you'll be motivated with hanami - it would be nice if we could have more alternatives to rails; rails is really heavy on the mind. This was one reason why I started with sinatra, it is so much simpler to get started ... it's only lacking when one wants to do more complex things, but from a LEARNING experience, sinatra is great - hope that hanami and padrino can have a smaller learning curve, similar to sinatra, than e. g. rails.
The text was updated successfully, but these errors were encountered:
If you're trying to get started in a simple way, you can run the new command without --database=postgres, and it'll use SQLite instead, which won't require running any server (though it's not great for production use).
Hello Luca and others,
Sorry if this report is not great and my apologies if I will not comment/reply to it in time; I am quite chaotic.
I will try to make the bug report as useful as possible.
There actually is not much to it:
I started with gem install hanami. All worked fine.
I then went to the official documentation and did:
hanami new bookshelf --database=postgresql
This worked too.
I cd-ed into bookshelf/ and then did:
bundle install
This also worked fine.
I then did:
bundle exec hanami server
The result was:
[2019-05-04 14:33:13] INFO WEBrick 1.4.2
[2019-05-04 14:33:13] INFO ruby 2.6.3 (2019-04-16) [x86_64-linux]
[2019-05-04 14:33:13] INFO WEBrick::HTTPServer#start: pid=22658 port=2300
From that information I inferred that I should use localhost:2300 (I knew a bit of
sinatra prior to hanami)
I visited that in my browser and got an error:
Boot Error
Something went wrong while loading /Users/x/DATA/bookshelf/config.ru
Hanami::Model::Error: PG::ConnectionBad: could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
/Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/hanami-model-1.3.2/lib/hanami/model/configuration.rb:161:in
rescue in load!' /Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/hanami-model-1.3.2/lib/hanami/model/configuration.rb:150:in
load!'/Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/hanami-model-1.3.2/lib/hanami/model.rb:80:in
load!' /Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/hanami-1.3.1/lib/hanami/components/components.rb:89:in
block (2 levels) in module:Components'/Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/hanami-1.3.1/lib/hanami/components/component.rb:44:in
call' /Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/hanami-1.3.1/lib/hanami/components.rb:108:in
block (2 levels) in resolve'/Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/map.rb:193:in
block in fetch_or_store' /Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/map.rb:172:in
fetch'/Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/map.rb:192:in
fetch_or_store' /Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/hanami-1.3.1/lib/hanami/components.rb:106:in
block in resolve'/Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/hanami-1.3.1/lib/hanami/components.rb:105:in
each' /Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/hanami-1.3.1/lib/hanami/components.rb:105:in
resolve'/Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/hanami-1.3.1/lib/hanami/components/component.rb:144:in
resolve_requirements' /Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/hanami-1.3.1/lib/hanami/components/component.rb:36:in
call'/Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/hanami-1.3.1/lib/hanami/components.rb:108:in
block (2 levels) in resolve' /Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/map.rb:193:in
block in fetch_or_store'/Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/map.rb:172:in
fetch' /Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/map.rb:192:in
fetch_or_store'/Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/hanami-1.3.1/lib/hanami/components.rb:106:in
block in resolve' /Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/hanami-1.3.1/lib/hanami/components.rb:105:in
each'/Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/hanami-1.3.1/lib/hanami/components.rb:105:in
resolve' /Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/hanami-1.3.1/lib/hanami.rb:126:in
boot'/Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/hanami-1.3.1/lib/hanami.rb:151:in
app' /Users/x/DATA/bookshelf/config.ru:3:in
block in inner_app'/Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in
instance_eval' /Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/builder.rb:55:in
initialize'/Users/x/DATA/bookshelf/config.ru:1:in
new' /Users/x/DATA/bookshelf/config.ru:1:in
inner_app'/Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/shotgun-0.9.2/lib/shotgun/loader.rb:113:in
eval' /Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/shotgun-0.9.2/lib/shotgun/loader.rb:113:in
inner_app'/Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/shotgun-0.9.2/lib/shotgun/loader.rb:103:in
assemble_app' /Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/shotgun-0.9.2/lib/shotgun/loader.rb:86:in
proceed_as_child'/Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/shotgun-0.9.2/lib/shotgun/loader.rb:31:in
call!' /Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/shotgun-0.9.2/lib/shotgun/loader.rb:18:in
call'/Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/hanami-1.3.1/lib/hanami/assets/static.rb:49:in
call' /Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/lint.rb:49:in
_call'/Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/lint.rb:37:in
call' /Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/show_exceptions.rb:23:in
call'/Programs/Ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/handler/webrick.rb:86:in
service' /Programs/Ruby/2.6.3/lib/ruby/2.6.0/webrick/httpserver.rb:140:in
service'/Programs/Ruby/2.6.3/lib/ruby/2.6.0/webrick/httpserver.rb:96:in
run' /Programs/Ruby/2.6.3/lib/ruby/2.6.0/webrick/server.rb:307:in
block in start_thread'Not entirely sure what the problem is.
The bold line by hanami displayed is:
Hanami::Model::Error: PG::ConnectionBad: could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
What is most confusing to me is ... the commandline said I should use port 2300 and
the URL I use is:
http://localhost:2300/
So I don't know why the error message reports port 5432.
Anyway I hope this is somewhat useful to you - perhaps the error message can be found in this strange port 5432 reporting, since that is not consistent with the port shown on the commandline.
Hopefully you'll be motivated with hanami - it would be nice if we could have more alternatives to rails; rails is really heavy on the mind. This was one reason why I started with sinatra, it is so much simpler to get started ... it's only lacking when one wants to do more complex things, but from a LEARNING experience, sinatra is great - hope that hanami and padrino can have a smaller learning curve, similar to sinatra, than e. g. rails.
The text was updated successfully, but these errors were encountered: