Quantcast

No Error, but no show

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

No Error, but no show

maxiquester
Hi ;)

with some help from this instructions https://github.com/foodcoop-adam/foodsoft/wiki/Deployment-%28Debian%29 I managed to get no error message while deploying the app, but there is no show either...
My apache-log shows just this

[Sun Apr 03 01:16:35 2016] [notice] SIGHUP received.  Attempting to restart

[ 2016-04-03 01:16:35.1065 14629/b633bb70 age/Cor/CoreMain.cpp:532 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ 2016-04-03 01:16:35.1065 14629/b6e4f700 age/Cor/CoreMain.cpp:901 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ 2016-04-03 01:16:35.1066 14629/b6e4f700 age/Cor/CoreMain.cpp:819 ]: Checking whether to disconnect long-running connections for process 14798, application /www/apps/foodsoft-production/current
[ 2016-04-03 01:16:35.1069 14629/b633bb70 Ser/Server.h:817 ]: [ServerThr.1] Freed 128 spare client objects
[ 2016-04-03 01:16:35.1069 14629/b633bb70 Ser/Server.h:464 ]: [ServerThr.1] Shutdown finished
[ 2016-04-03 01:16:35.1069 14629/b4e3bb70 Ser/Server.h:817 ]: [ApiServer] Freed 0 spare client objects
[ 2016-04-03 01:16:35.1069 14629/b4e3bb70 Ser/Server.h:464 ]: [ApiServer] Shutdown finished
[ 2016-04-03 01:16:35.1070 14629/b58bbb70 Ser/Server.h:817 ]: [ServerThr.2] Freed 128 spare client objects
[ 2016-04-03 01:16:35.1070 14629/b58bbb70 Ser/Server.h:464 ]: [ServerThr.2] Shutdown finished
[ 2016-04-03 01:16:35.1071 14629/b6e4f700 age/Cor/CoreMain.cpp:819 ]: Checking whether to disconnect long-running connections for process 14798, application /www/apps/foodsoft-production/current

[ 2016-04-03 01:16:35.1178 14634/b6d5bb70 age/Ust/UstRouterMain.cpp:422 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ 2016-04-03 01:16:35.1178 14634/b6dfc700 age/Ust/UstRouterMain.cpp:492 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ 2016-04-03 01:16:35.1179 14634/b62dbb70 Ser/Server.h:817 ]: [UstRouterApiServer] Freed 0 spare client objects
[ 2016-04-03 01:16:35.1179 14634/b62dbb70 Ser/Server.h:464 ]: [UstRouterApiServer] Shutdown finished
[ 2016-04-03 01:16:35.1181 14634/b6d5bb70 Ser/Server.h:464 ]: [UstRouter] Shutdown finished
[ 2016-04-03 01:16:35.1182 14634/b6dfc700 age/Ust/UstRouterMain.cpp:523 ]: Passenger UstRouter shutdown finished
[ 2016-04-03 01:16:35.1551 14879/b6e0f700 age/Wat/WatchdogMain.cpp:1276 ]: Starting Passenger watchdog...
[ 2016-04-03 01:16:35.1851 14883/b6e8f700 age/Cor/CoreMain.cpp:982 ]: Starting Passenger core...
[ 2016-04-03 01:16:35.1853 14883/b6e8f700 age/Cor/CoreMain.cpp:235 ]: Passenger core running in multi-application mode.
[ 2016-04-03 01:16:35.2501 14883/b6e8f700 age/Cor/CoreMain.cpp:732 ]: Passenger core online, PID 14883
[ 2016-04-03 01:16:35.2761 14888/b6e60700 age/Ust/UstRouterMain.cpp:529 ]: Starting Passenger UstRouter...
[ 2016-04-03 01:16:35.2814 14888/b6e60700 age/Ust/UstRouterMain.cpp:342 ]: Passenger UstRouter online, PID 14888
[Sun Apr 03 01:16:35 2016] [notice] Apache/2.2.22 (Debian) Phusion_Passenger/5.0.26 configured -- resuming normal operations
[ 2016-04-03 01:16:35.6725 14629/b6e4f700 age/Cor/CoreMain.cpp:967 ]: Passenger core shutdown finished
App 14970 stdout:
App 15052 stdout:

when I curl my IP, nothing happens...
Did this appear before?

Thank you for your help!

Yours,
Maxi
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No Error, but no show

wvengen
Administrator
Hi Maxi,

I'm sorry to hear it's such a hassle to get it deployed properly!
The logs you send look like Passenger just restarted and continued serving files.
It may take some time to load everything the first web request (~10s), but after that it should be ok.

Looks like the same problem as with nginx :( Weird.
Does it work when you shutdown apache/nginx and run manually
ENV=production rails s -p 80
Just to see if Foodsoft is properly installed?

- Willem

On 03-04-16 01:11, Maxiquester [via foodsoft] wrote:
Hi ;)

with some help from this instructions https://github.com/foodcoop-adam/foodsoft/wiki/Deployment-%28Debian%29 I managed to get no error message while deploying the app, but there is no show either...
My apache-log shows just this

[Sun Apr 03 01:16:35 2016] [notice] SIGHUP received.  Attempting to restart

[ 2016-04-03 01:16:35.1065 14629/b633bb70 age/Cor/CoreMain.cpp:532 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ 2016-04-03 01:16:35.1065 14629/b6e4f700 age/Cor/CoreMain.cpp:901 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ 2016-04-03 01:16:35.1066 14629/b6e4f700 age/Cor/CoreMain.cpp:819 ]: Checking whether to disconnect long-running connections for process 14798, application /www/apps/foodsoft-production/current
[ 2016-04-03 01:16:35.1069 14629/b633bb70 Ser/Server.h:817 ]: [ServerThr.1] Freed 128 spare client objects
[ 2016-04-03 01:16:35.1069 14629/b633bb70 Ser/Server.h:464 ]: [ServerThr.1] Shutdown finished
[ 2016-04-03 01:16:35.1069 14629/b4e3bb70 Ser/Server.h:817 ]: [ApiServer] Freed 0 spare client objects
[ 2016-04-03 01:16:35.1069 14629/b4e3bb70 Ser/Server.h:464 ]: [ApiServer] Shutdown finished
[ 2016-04-03 01:16:35.1070 14629/b58bbb70 Ser/Server.h:817 ]: [ServerThr.2] Freed 128 spare client objects
[ 2016-04-03 01:16:35.1070 14629/b58bbb70 Ser/Server.h:464 ]: [ServerThr.2] Shutdown finished
[ 2016-04-03 01:16:35.1071 14629/b6e4f700 age/Cor/CoreMain.cpp:819 ]: Checking whether to disconnect long-running connections for process 14798, application /www/apps/foodsoft-production/current

[ 2016-04-03 01:16:35.1178 14634/b6d5bb70 age/Ust/UstRouterMain.cpp:422 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ 2016-04-03 01:16:35.1178 14634/b6dfc700 age/Ust/UstRouterMain.cpp:492 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ 2016-04-03 01:16:35.1179 14634/b62dbb70 Ser/Server.h:817 ]: [UstRouterApiServer] Freed 0 spare client objects
[ 2016-04-03 01:16:35.1179 14634/b62dbb70 Ser/Server.h:464 ]: [UstRouterApiServer] Shutdown finished
[ 2016-04-03 01:16:35.1181 14634/b6d5bb70 Ser/Server.h:464 ]: [UstRouter] Shutdown finished
[ 2016-04-03 01:16:35.1182 14634/b6dfc700 age/Ust/UstRouterMain.cpp:523 ]: Passenger UstRouter shutdown finished
[ 2016-04-03 01:16:35.1551 14879/b6e0f700 age/Wat/WatchdogMain.cpp:1276 ]: Starting Passenger watchdog...
[ 2016-04-03 01:16:35.1851 14883/b6e8f700 age/Cor/CoreMain.cpp:982 ]: Starting Passenger core...
[ 2016-04-03 01:16:35.1853 14883/b6e8f700 age/Cor/CoreMain.cpp:235 ]: Passenger core running in multi-application mode.
[ 2016-04-03 01:16:35.2501 14883/b6e8f700 age/Cor/CoreMain.cpp:732 ]: Passenger core online, PID 14883
[ 2016-04-03 01:16:35.2761 14888/b6e60700 age/Ust/UstRouterMain.cpp:529 ]: Starting Passenger UstRouter...
[ 2016-04-03 01:16:35.2814 14888/b6e60700 age/Ust/UstRouterMain.cpp:342 ]: Passenger UstRouter online, PID 14888
[Sun Apr 03 01:16:35 2016] [notice] Apache/2.2.22 (Debian) Phusion_Passenger/5.0.26 configured -- resuming normal operations
[ 2016-04-03 01:16:35.6725 14629/b6e4f700 age/Cor/CoreMain.cpp:967 ]: Passenger core shutdown finished
App 14970 stdout:
App 15052 stdout:

when I curl my IP, nothing happens...
Did this appear before?

Yours,
Maxi

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No Error, but no show

maxiquester
Hi Willem,

Thank you for your answere.
I solved the problem. It occurs when SSL is not configurated ;)

So the errorpage of foodsoft is shown now and I am getting mails about a Mysql error when I try to open the page

An ActionView::Template::Error occurred in sessions#new:

  Mysql2::Error: Table 'foodsoft_production.pages' doesn't exist: SHOW FULL FIELDS FROM `pages`
  app/views/sessions/new.html.haml:13:in `_934b30c53efbe0d9b358153999b1d826'


-------------------------------
Request:
-------------------------------

  * URL        : https://biomio-giessen.de/f/login
  * HTTP Method: GET
  * IP address : myip
  * Parameters : {"controller"=>"sessions", "action"=>"new", "foodcoop"=>"f"}
  * Timestamp  : 2016-04-03 10:09:10 UTC
  * Server : h2540559.stratoserver.net
  * Rails root : /www/apps/foodsoft-production/releases/20160402224542
  * Process: 1996

-------------------------------
Session:
-------------------------------

  * session id: [FILTERED]
  * data: {"session_id"=>"0b58b9868c6f24128e96b90f12b22941",
   "locale"=>:en,
   "return_to"=>"https://biomio-giessen.de/f",
   "flash"=>{"discard"=>[], "flashes"=>{"alert"=>"Authentication required!"}}}

-------------------------------
Environment:
-------------------------------

  * HTTPS                                          : on
  * HTTP_ACCEPT                                    : text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  * HTTP_ACCEPT_ENCODING                           : gzip, deflate, br
  * HTTP_ACCEPT_LANGUAGE                           : en-US,en;q=0.5
  * HTTP_COOKIE                                    : _foodsoft_session=aWh3OFI2TmdGajV3K0NiODNRUVZLSnQrUmZkUlRCQUNCdUNQZDJKYjhaYjdnOUxBMHMzQWIzRitFdmhucDhPcUpsWEdjd0xkSTFNREFTYmd5anZjZ1RLSElvampKUXZvTThXZVU2ZWtGRndvb2hKMlR3eWFUbnkrZ2pLOW9HQ0orNmR6aEJJaHdETlMwRkV2eHdZZTQxSlgvbjI1bGFaT2FrY255VmNrTFJ0UHZqQWQ2TG1EVTdIVWZWSnpjcTdvTnhZL28zUmdkd3JWQm9RR3o5STI0U05vL0xsUk1kMDFPRG5nVnVYSW5GT3F6cnc4WGVIVlpkRzRzZEJSeDQ5K1BERFNJNEw0U2s1V0NBTmRFV3RVeW1KLzh4d0IrbVFUTFpMdnZpV1h4UGM9LS1ZZFYyNUdEa0NadW5Eb3JxSjArMFNBPT0%3D--e9e5632551c4f2abfacff6dca070fb15a324e43d
  * HTTP_HOST                                      : biomio-giessen.de
  * HTTP_USER_AGENT                                : Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
  * HTTP_VERSION                                   : HTTP/1.1
  * ORIGINAL_FULLPATH                              : /f/login
  * ORIGINAL_SCRIPT_NAME                           :
  * PASSENGER_CONNECT_PASSWORD                     : [FILTERED]
  * PATH_INFO                                      : /f/login
  * QUERY_STRING                                   :
  * REMOTE_ADDR                                    : 94.219.179.187
  * REMOTE_PORT                                    : 43785
  * REQUEST_METHOD                                 : GET
  * REQUEST_URI                                    : /f/login
  * ROUTES_88487200_SCRIPT_NAME                    :
  * SCRIPT_NAME                                    :
  * SERVER_NAME                                    : biomio-giessen.de
  * SERVER_PORT                                    : 443
  * SERVER_PROTOCOL                                : HTTP/1.1
  * SERVER_SOFTWARE                                : Apache/2.2.22 (Debian) Phusion_Passenger/5.0.26
  * SSL_TLS_SNI                                    : biomio-giessen.de
  * action_controller.instance                     : #<SessionsController:0xa4167fc>
  * action_dispatch.backtrace_cleaner              : #<Rails::BacktraceCleaner:0x8d1943c>
  * action_dispatch.cookies                        : #<ActionDispatch::Cookies::CookieJar:0xa4156cc>
  * action_dispatch.cookies_digest                 :
  * action_dispatch.cookies_serializer             :
  * action_dispatch.encrypted_cookie_salt          : encrypted cookie
  * action_dispatch.encrypted_signed_cookie_salt   : signed encrypted cookie
  * action_dispatch.http_auth_salt                 : http authentication
  * action_dispatch.key_generator                  : #<ActiveSupport::CachingKeyGenerator:0x9f51014>
  * action_dispatch.logger                         : #<ActiveSupport::Logger:0xa8a5c28>
  * action_dispatch.parameter_filter               : [:password]
  * action_dispatch.redirect_filter                : []
  * action_dispatch.remote_ip                      : 94.219.179.187
  * action_dispatch.request.content_type           :
  * action_dispatch.request.formats                : [#<Mime::Type:0xadec768 @synonyms=["application/xhtml+xml"], @symbol=:html, @string="text/html", @hash=-504465060>]
  * action_dispatch.request.parameters             : {"controller"=>"sessions", "action"=>"new", "foodcoop"=>"f"}
  * action_dispatch.request.path_parameters        : {:controller=>"sessions", :action=>"new", :foodcoop=>"f"}
  * action_dispatch.request.query_parameters       : {}
  * action_dispatch.request.request_parameters     : {}
  * action_dispatch.request.unsigned_session_cookie: {"session_id"=>"0b58b9868c6f24128e96b90f12b22941", "locale"=>:en, "return_to"=>"https://biomio-giessen.de/f", "flash"=>{"discard"=>[], "flashes"=>{"alert"=>"Authentication required!"}}}
  * action_dispatch.request_id                     : 5855ee8b-1440-4969-a05a-541b7bc42694
  * action_dispatch.routes                         : #<ActionDispatch::Routing::RouteSet:0xa8c6a40>
  * action_dispatch.secret_key_base                : sfg57hf479iztd436jtfwqpkgfvut698gfuikhghngf4678jgnj98k7zeik87jl09k3gbg6z75zhjkkmsgmb7hnb1chgd1d
  * action_dispatch.secret_token                   :
  * action_dispatch.show_detailed_exceptions       : false
  * action_dispatch.show_exceptions                : true
  * action_dispatch.signed_cookie_salt             : signed cookie
  * rack.errors                                    : #<IO:0x8d38b0c>
  * rack.hijack                                    : #<Proc:0xa4176ac@/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:84 (lambda)>
  * rack.hijack?                                   : true
  * rack.input                                     : #<PhusionPassenger::Utils::TeeInput:0xa417724>
  * rack.multiprocess                              : true
  * rack.multithread                               : false
  * rack.request.cookie_hash                       : {"_foodsoft_session"=>"aWh3OFI2TmdGajV3K0NiODNRUVZLSnQrUmZkUlRCQUNCdUNQZDJKYjhaYjdnOUxBMHMzQWIzRitFdmhucDhPcUpsWEdjd0xkSTFNREFTYmd5anZjZ1RLSElvampKUXZvTThXZVU2ZWtGRndvb2hKMlR3eWFUbnkrZ2pLOW9HQ0orNmR6aEJJaHdETlMwRkV2eHdZZTQxSlgvbjI1bGFaT2FrY255VmNrTFJ0UHZqQWQ2TG1EVTdIVWZWSnpjcTdvTnhZL28zUmdkd3JWQm9RR3o5STI0U05vL0xsUk1kMDFPRG5nVnVYSW5GT3F6cnc4WGVIVlpkRzRzZEJSeDQ5K1BERFNJNEw0U2s1V0NBTmRFV3RVeW1KLzh4d0IrbVFUTFpMdnZpV1h4UGM9LS1ZZFYyNUdEa0NadW5Eb3JxSjArMFNBPT0=--e9e5632551c4f2abfacff6dca070fb15a324e43d"}
  * rack.request.cookie_string                     : _foodsoft_session=aWh3OFI2TmdGajV3K0NiODNRUVZLSnQrUmZkUlRCQUNCdUNQZDJKYjhaYjdnOUxBMHMzQWIzRitFdmhucDhPcUpsWEdjd0xkSTFNREFTYmd5anZjZ1RLSElvampKUXZvTThXZVU2ZWtGRndvb2hKMlR3eWFUbnkrZ2pLOW9HQ0orNmR6aEJJaHdETlMwRkV2eHdZZTQxSlgvbjI1bGFaT2FrY255VmNrTFJ0UHZqQWQ2TG1EVTdIVWZWSnpjcTdvTnhZL28zUmdkd3JWQm9RR3o5STI0U05vL0xsUk1kMDFPRG5nVnVYSW5GT3F6cnc4WGVIVlpkRzRzZEJSeDQ5K1BERFNJNEw0U2s1V0NBTmRFV3RVeW1KLzh4d0IrbVFUTFpMdnZpV1h4UGM9LS1ZZFYyNUdEa0NadW5Eb3JxSjArMFNBPT0%3D--e9e5632551c4f2abfacff6dca070fb15a324e43d
  * rack.request.query_hash                        : {}
  * rack.request.query_string                      :
  * rack.run_once                                  : false
  * rack.session                                   : #<ActionDispatch::Request::Session:0xa416f2c>
  * rack.session.options                           : #<ActionDispatch::Request::Session::Options:0xa416f04>
  * rack.url_scheme                                : https
  * rack.version                                   : [1, 2]

-------------------------------
Backtrace:
-------------------------------

  app/views/sessions/new.html.haml:13:in `_934b30c53efbe0d9b358153999b1d826'
  app/controllers/application_controller.rb:214:in `set_currency'
  app/controllers/application_controller.rb:202:in `set_time_zone'


Shouldn't foodsoft_production.pages be set up by 'bundle exec cap production deploy'?

Yours,
Maxi
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No Error, but no show

wvengen
Administrator
Hi Maxi,

Glad the server works now.
Deploy is for deploying updates. If you install one for the first time, deploy will fail, and you need to setup configuration files and initialise the database. After that, deploy should succeed.
Did you do the following?
ENV=production rake db:create db:seed
This table is created from the schema, so I expect this is the case.

- Willem

On 03-04-16 12:15, maxiquester [via foodsoft] wrote:
Hi Willem,

Thank you for your answere.
I solved the problem. It occurs when SSL is not configurated ;)

So the errorpage of foodsoft is shown now and I am getting mails about a Mysql error when I try to open the page

An ActionView::Template::Error occurred in sessions#new:

  Mysql2::Error: Table 'foodsoft_production.pages' doesn't exist: SHOW FULL FIELDS FROM `pages`
  app/views/sessions/new.html.haml:13:in `_934b30c53efbe0d9b358153999b1d826'
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No Error, but no show

maxiquester
Ah ok, thank you ;) that explains it :D

I tried it but then I got this message below ;) . To run rake db:migrate doesn't work neither....


rake db:create db:seed --trace** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:create
foodsoft_development already exists
Access denied for user 'root'@'localhost' (using password: NO)Please provide the root password for your MySQL installation
>mypassword ;)
Mysql2::Error: Can't create database 'foodsoft_test'; database exists: CREATE DATABASE `foodsoft_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`
/home/deploy/.rvm/gems/ruby-2.2.1/gems/mysql2-0.4.3/lib/mysql2/client.rb:107:in `_query'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/mysql2-0.4.3/lib/mysql2/client.rb:107:in `block in query'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/mysql2-0.4.3/lib/mysql2/client.rb:106:in `handle_interrupt'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/mysql2-0.4.3/lib/mysql2/client.rb:106:in `query'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:305:in `block in execute'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract_adapter.rb:472:in `block in log'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.6/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract_adapter.rb:466:in `log'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:305:in `execute'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.6/lib/active_record/connection_adapters/mysql2_adapter.rb:231:in `execute'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:373:in `create_database'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.6/lib/active_record/tasks/mysql_database_tasks.rb:28:in `rescue in create'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.6/lib/active_record/tasks/mysql_database_tasks.rb:15:in `create'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.6/lib/active_record/tasks/database_tasks.rb:93:in `create'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.6/lib/active_record/tasks/database_tasks.rb:107:in `block in create_current'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.6/lib/active_record/tasks/database_tasks.rb:275:in `block in each_current_configuration'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.6/lib/active_record/tasks/database_tasks.rb:274:in `each'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.6/lib/active_record/tasks/database_tasks.rb:274:in `each_current_configuration'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.6/lib/active_record/tasks/database_tasks.rb:106:in `create_current'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.6/lib/active_record/railties/databases.rake:17:in `block (2 levels) in <top (required)>'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/rake-11.1.1/lib/rake/task.rb:248:in `call'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/rake-11.1.1/lib/rake/task.rb:248:in `block in execute'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/rake-11.1.1/lib/rake/task.rb:243:in `each'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/rake-11.1.1/lib/rake/task.rb:243:in `execute'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/rake-11.1.1/lib/rake/task.rb:187:in `block in invoke_with_call_chain'
/home/deploy/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/rake-11.1.1/lib/rake/task.rb:180:in `invoke_with_call_chain'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/rake-11.1.1/lib/rake/task.rb:173:in `invoke'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/rake-11.1.1/lib/rake/application.rb:150:in `invoke_task'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/rake-11.1.1/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/rake-11.1.1/lib/rake/application.rb:106:in `each'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/rake-11.1.1/lib/rake/application.rb:106:in `block in top_level'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/rake-11.1.1/lib/rake/application.rb:115:in `run_with_threads'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/rake-11.1.1/lib/rake/application.rb:100:in `top_level'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/rake-11.1.1/lib/rake/application.rb:78:in `block in run'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/rake-11.1.1/lib/rake/application.rb:176:in `standard_exception_handling'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/rake-11.1.1/lib/rake/application.rb:75:in `run'
/home/deploy/.rvm/gems/ruby-2.2.1/gems/rake-11.1.1/bin/rake:33:in `<top (required)>'
/home/deploy/.rvm/gems/ruby-2.2.1/bin/rake:23:in `load'
/home/deploy/.rvm/gems/ruby-2.2.1/bin/rake:23:in `<main>'
/home/deploy/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
/home/deploy/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'
Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "reconnect"=>false, "database"=>"foodsoft_test", "pool"=>5, "host"=>"localhost"}
** Invoke db:seed (first_time)
** Execute db:seed
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
config.eager_load is set to nil. Please update your config/environments/*.rb files accordingly:

  * development - set it to false
  * test - set it to false (unless you use a tool that preloads your test environment)
  * production - set it to true

DEPRECATION WARNING: Currently, Active Record suppresses errors raised within `after_rollback`/`after_commit` callbacks and only print them to the logs. In the next version, these errors will no longer be suppressed. Instead, the errors will propagate normally just like in other Active Record callbacks.

You can opt into the new behavior and remove this warning by setting:

  config.active_record.raise_in_transactional_callbacks = true

 (called from block in tsort_each at /home/deploy/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:226)
DEPRECATION WARNING: Currently, Active Record suppresses errors raised within `after_rollback`/`after_commit` callbacks and only print them to the logs. In the next version, these errors will no longer be suppressed. Instead, the errors will propagate normally just like in other Active Record callbacks.

You can opt into the new behavior and remove this warning by setting:

  config.active_record.raise_in_transactional_callbacks = true

 (called from block in tsort_each at /home/deploy/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:226)
** Execute db:abort_if_pending_migrations
You have 57 pending migrations:
     1 CreateUsers
     2 CreateGroups
     3 CreateSuppliers
     4 CreateArticleMeta
     5 CreateFinancialTransactions
     6 CreateArticles
     7 CreateArticlePrices
     8 CreateOrders
     9 CreateOrderResults
    10 UserPasswordReset
    11 CreateComments
    12 CreateOrderClearing
    13 AddMessaging
    14 CreateTasks
    15 ChangeResultQuantities
    16 AddSharedListsConnection
    17 AddMinOrderQuantity
    18 CreateInvites
    19 RemoveUniquenessOfArticleName
    20 AddUsersLastLogin
    21 RemoveTableArticlePrices
    22 AddRequiredUserForTask
    23 NewWording
    24 AddDepositDefaults
    25 ExtendComments
  20090120184410 RoadToVersionThree
  20090317175355 AddProfitToOrders
  20090325175756 CreatePages
  20090405131156 ModifyGroupOrderArticleResult
  20090731132547 AddStatsToGroups
  20090811144901 AddWeeklyToTasks
  20090812110010 AddNoteToDeliveries
  20090907120012 AddMissingIndexes
  20110507184920 AddDurationToTasks
  20110507192928 AddTaskDurationToWorkgroups
  20120512211613 AddOrderIndexes
  20120622094337 AddNextWeeklyTasksNumberToWorkgroups
  20120929155541 AddIgnoreAppleRestrictionToGroups
  20121112093327 AddCreatedByUserIdToOrders
  20121216180646 RemoveAssignedFromTasks
  20121230142516 RemoveAccountUpdatedFromOrdergroups
  20130615073715 CreatePeriodicTaskGroups
  20130622095040 MoveWeeklyTasks
  20130624084223 RemoveWeeklyFromTasks
  20130624085246 RemoveWeeklyTaskFromGroups
  20130702113610 UpdateGroupOrderTotals
  20130718183100 CreateSettings
  20130718183101 MigrateUserSettings
  20130920201529 AllowMissingNick
  20130930132511 AddQuantitiesToOrderArticle
  20140102170431 AddResultComputedToGroupOrderArticles
  20140318173000 DeleteEmptyGroupOrderArticles
  20140521142651 AddSyncMethodToSupplier
  20140921104907 RemoveStaleMemberships
  20141211210719 IncreaseAccountBalancePrecision
  20150227161931 AddReplytoAndGroupidToMessages
  20150301000000 AddLastActivityToUser
Run `rake db:migrate` to update your database then try again.


Thank you again!
Maxi
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No Error, but no show

wvengen
Administrator
So somehow your database already exists, but isn't setup. You probably
need to `rake db:drop` it before creating it.
And passing RAILS_ENV=production avoids those development and test
errors, which you really don't need on production.

- Willem

On 04-04-16 20:52, maxiquester [via foodsoft] wrote:

> Ah ok, thank you ;) that explains it :D
>
> I tried it but then I got this message below ;) . To run rake
> db:migrate doesn't work neither....
>
>
> rake db:create db:seed --trace** Invoke db:create (first_time)
> ** Invoke db:load_config (first_time)
> ** Execute db:load_config
> ** Execute db:create
> foodsoft_development already exists
> Access denied for user 'root'@'localhost' (using password: NO)Please
> provide the root password for your MySQL installation
> >mypassword ;)
> Mysql2::Error: Can't create database 'foodsoft_test'; database exists:
> CREATE DATABASE `foodsoft_test` DEFAULT CHARACTER SET `utf8` COLLATE
> `utf8_unicode_ci`

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No Error, but no show

maxiquester
Hey Willem,

Thank you, that made sense.
It worked with
RAILS_ENV=production rake db:drop db:create db:schema:load db:seed db:migrate
It seems like db:seed needs db:migrate and vice versa so I found this schema:load on stackoverflow.

Now I'm getting a new E-mail :DD

An ActiveRecord::StatementInvalid occurred in sessions#new:

  Mysql2::Error: Unknown column 'users.deleted_at' in 'where clause': SELECT  `users`.* FROM `users` WHERE `users`.`deleted_at` IS NULL AND `users`.`id` = 1 LIMIT 1
  app/controllers/application_controller.rb:23:in `current_user'


Yours,
Maxi
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No Error, but no show

wvengen
Administrator
On 05-04-16 00:12, maxiquester [via foodsoft] wrote:

RAILS_ENV=production rake db:drop db:create db:schema:load db:seed db:migrate
If you need db:migrate, that either something is wrong with the code (if you pulled master at some point, you could try updating - #425), or loading the schema failed. But it shouldn't hurt either.

There have been a lot of changes lately, it may be safer to checkout a specific version (that has had some testing).
git checkout v4.4.1

- Willem

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No Error, but no show

maxiquester
Hi Willem,
when I try to seed, rake wants to have run the migration before thats why I found the schema:load:

/www/apps/foodsoft$ git checkout v4.4.1
M Gemfile
M Gemfile.lock
M config/environments/production.rb
M db/schema.rb
HEAD is now at 7801b36... Bumped new version: 4.4.1
deploy@h2540559:/www/apps/foodsoft$ RAILS_ENV=production rake db:drop
deploy@h2540559:/www/apps/foodsoft$ RAILS_ENV=production rake db:create
deploy@h2540559:/www/apps/foodsoft$ RAILS_ENV=production rake db:seed
You have 57 pending migrations:
     1 CreateUsers
     2 CreateGroups
     3 CreateSuppliers
     4 CreateArticleMeta
     5 CreateFinancialTransactions
     6 CreateArticles
     7 CreateArticlePrices
     8 CreateOrders
     9 CreateOrderResults
    10 UserPasswordReset
    11 CreateComments
    12 CreateOrderClearing
    13 AddMessaging
    14 CreateTasks
    15 ChangeResultQuantities
    16 AddSharedListsConnection
    17 AddMinOrderQuantity
    18 CreateInvites
    19 RemoveUniquenessOfArticleName
    20 AddUsersLastLogin
    21 RemoveTableArticlePrices
    22 AddRequiredUserForTask
    23 NewWording
    24 AddDepositDefaults
    25 ExtendComments
  20090120184410 RoadToVersionThree
  20090317175355 AddProfitToOrders
  20090325175756 CreatePages
  20090405131156 ModifyGroupOrderArticleResult
  20090731132547 AddStatsToGroups
  20090811144901 AddWeeklyToTasks
  20090812110010 AddNoteToDeliveries
  20090907120012 AddMissingIndexes
  20110507184920 AddDurationToTasks
  20110507192928 AddTaskDurationToWorkgroups
  20120512211613 AddOrderIndexes
  20120622094337 AddNextWeeklyTasksNumberToWorkgroups
  20120929155541 AddIgnoreAppleRestrictionToGroups
  20121112093327 AddCreatedByUserIdToOrders
  20121216180646 RemoveAssignedFromTasks
  20121230142516 RemoveAccountUpdatedFromOrdergroups
  20130615073715 CreatePeriodicTaskGroups
  20130622095040 MoveWeeklyTasks
  20130624084223 RemoveWeeklyFromTasks
  20130624085246 RemoveWeeklyTaskFromGroups
  20130702113610 UpdateGroupOrderTotals
  20130718183100 CreateSettings
  20130718183101 MigrateUserSettings
  20130920201529 AllowMissingNick
  20130930132511 AddQuantitiesToOrderArticle
  20140102170431 AddResultComputedToGroupOrderArticles
  20140318173000 DeleteEmptyGroupOrderArticles
  20140521142651 AddSyncMethodToSupplier
  20140921104907 RemoveStaleMemberships
  20141211210719 IncreaseAccountBalancePrecision
  20150227161931 AddReplytoAndGroupidToMessages
  20150301000000 AddLastActivityToUser
Run `rake db:migrate` to update your database then try again.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No Error, but no show

wvengen
Administrator

On 05-04-16 10:09, maxiquester [via foodsoft] wrote:
> $ git checkout v4.4.1
> M Gemfile
> M Gemfile.lock
> M config/environments/production.rb
> M db/schema.rb
> HEAD is now at 7801b36... Bumped new version: 4.4.1
While you checked out version 4.4.1, your schema is still modified. You
may need to do a git checkout db/schema.rb Gemfile* first (and run
bundle install afterwards).

> deploy@h2540559:/www/apps/foodsoft$ RAILS_ENV=production rake db:drop
> deploy@h2540559:/www/apps/foodsoft$ RAILS_ENV=production rake db:create
> deploy@h2540559:/www/apps/foodsoft$ RAILS_ENV=production rake db:seed
> You have 57 pending migrations:
Indeed you forgot to run rake db:schema:load before seeding.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No Error, but no show

maxiquester
Hi Willem,

thank you for your quick answer.
Now I did
git checkout v4.4.1
git checkout v4.4.1 db/schema Gemfile*
bundle install
RAILS_ENV=production rake db:drop db:create db:schema:load db:seed

and still got the same error, but the Startpage also shows foodsoft v. 4.4.99

Yours,
Maxi
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No Error, but no show

wvengen
Administrator
Hi Maxi,

It may help to study git a bit more so you understand how checking out
code and local changes work together.


- Willem

On 05-04-16 11:20, maxiquester [via foodsoft] wrote:

> Hi Willem,
>
> thank you for your quick answer.
> Now I did
> git checkout v4.4.1
> git checkout v4.4.1 db/schema Gemfile*
> bundle install
> RAILS_ENV=production rake db:drop db:create db:schema:load db:seed
>
> and still got the same error, but the Startpage also shows foodsoft v.
> 4.4.99
>
> Yours,
> Maxi

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: No Error, but no show

maxiquester
IT WORKS!!!!!!!!!!!

Thank you very much Willem :)
Loading...