Closed Mifrill closed 6 years ago
Your Dockerfile uses Ubuntu 17. I only tested this on Ubuntu 16 LTS, try to change OS first. Then, post logs here if you still have an error.
@zharikovpro , unfortunately the version of linux does not matter in this case, same problem for debian 9.2, ubuntu: 17.04, 17.10, 16.04, 16.10.
All works correctly if we use gem headless, which you have forbidden to use, due to the redundancy of its use.
Failing tests with 'js' label
Dockerfile: https://github.com/Mifrill/railgun/blob/issue_238/Dockerfile Build trace: https://travis-ci.org/Mifrill/railgun/builds/340805091
@zharikovpro Please assigness me for this issue, thank you
in this PR #269 there is an error when running rails s in the prod on Dockerfile.prod mode
sudo docker run -i -t -p 3000:3000 railgun_prod
DEPRECATION WARNING: The factory_girl gem is deprecated. Please upgrade to factory_bot. See https://github.com/thoughtbot/factory_bot/blob/v4.9.0/UPGRADE_FROM_FACTORY_GIRL.md for further instructions. (called from <top (required)> at /root/railgun/config/application.rb:7)
=> Booting WEBrick
=> Rails 5.1.6 application starting in production on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
Exiting
Traceback (most recent call last):
75: from bin/rails:4:in `<main>'
74: from bin/rails:4:in `load'
73: from /root/railgun/bin/spring:15:in `<top (required)>'
72: from /root/railgun/bin/spring:15:in `require'
71: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
70: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
69: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
68: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
67: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
66: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
65: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
64: from /root/railgun/bin/rails:11:in `<top (required)>'
63: from /root/railgun/bin/rails:11:in `require'
62: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/commands.rb:16:in `<top (required)>'
61: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/command.rb:44:in `invoke'
60: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/command/base.rb:63:in `perform'
59: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
58: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
57: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
56: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in `perform'
55: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:130:in `tap'
54: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:135:in `block in perform'
53: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:44:in `start'
52: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/rack-2.0.5/lib/rack/server.rb:283:in `start'
51: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/rack-2.0.5/lib/rack/server.rb:354:in `wrapped_app'
50: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/commands/server/server_command.rb:24:in `app'
49: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/rack-2.0.5/lib/rack/server.rb:219:in `app'
48: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/rack-2.0.5/lib/rack/server.rb:319:in `build_app_and_options_from_config'
47: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/rack-2.0.5/lib/rack/builder.rb:40:in `parse_file'
46: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/rack-2.0.5/lib/rack/builder.rb:49:in `new_from_string'
45: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/rack-2.0.5/lib/rack/builder.rb:49:in `eval'
44: from config.ru:in `<main>'
43: from config.ru:in `new'
42: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in `initialize'
41: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/rack-2.0.5/lib/rack/builder.rb:55:in `instance_eval'
40: from config.ru:3:in `block in <main>'
39: from config.ru:3:in `require_relative'
38: from /root/railgun/config/environment.rb:5:in `<top (required)>'
37: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/application.rb:353:in `initialize!'
36: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/initializable.rb:58:in `run_initializers'
35: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/tsort.rb:205:in `tsort_each'
34: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/tsort.rb:226:in `tsort_each'
33: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/tsort.rb:347:in `each_strongly_connected_component'
32: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/tsort.rb:347:in `call'
31: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/tsort.rb:347:in `each'
30: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/tsort.rb:349:in `block in each_strongly_connected_component'
29: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/tsort.rb:431:in `each_strongly_connected_component_from'
28: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
27: from /root/.rbenv/versions/2.5.0/lib/ruby/2.5.0/tsort.rb:228:in `block in tsort_each'
26: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/initializable.rb:59:in `block in run_initializers'
25: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/initializable.rb:30:in `run'
24: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/initializable.rb:30:in `instance_exec'
23: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/application/finisher.rb:66:in `block in <module:Finisher>'
22: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/lazy_load_hooks.rb:49:in `run_load_hooks'
21: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/lazy_load_hooks.rb:49:in `each'
20: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/lazy_load_hooks.rb:50:in `block in run_load_hooks'
19: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/lazy_load_hooks.rb:65:in `execute_hook'
18: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/lazy_load_hooks.rb:60:in `with_execution_control'
17: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/lazy_load_hooks.rb:67:in `block in execute_hook'
16: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/devise-4.4.3/lib/devise/rails.rb:17:in `block in <class:Engine>'
15: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/application.rb:164:in `reload_routes!'
14: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/application/routes_reloader.rb:18:in `reload!'
13: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/application/routes_reloader.rb:55:in `load_paths'
12: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/application/routes_reloader.rb:55:in `each'
11: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.1.6/lib/rails/application/routes_reloader.rb:55:in `block in load_paths'
10: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in `load'
9: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:258:in `load_dependency'
8: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in `block in load'
7: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/activesupport-5.1.6/lib/active_support/dependencies.rb:286:in `load'
6: from /root/railgun/config/routes.rb:1:in `<top (required)>'
5: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/actionpack-5.1.6/lib/action_dispatch/routing/route_set.rb:418:in `draw'
4: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/actionpack-5.1.6/lib/action_dispatch/routing/route_set.rb:436:in `eval_block'
3: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/actionpack-5.1.6/lib/action_dispatch/routing/route_set.rb:436:in `instance_exec'
2: from /root/railgun/config/routes.rb:8:in `block in <top (required)>'
1: from /root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/devise-4.4.3/lib/devise/rails/routes.rb:228:in `devise_for'
/root/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/devise-4.4.3/lib/devise/rails/routes.rb:500:in `raise_no_secret_key': Devise.secret_key was not set. Please add the following to your Devise initializer: (RuntimeError)
config.secret_key = '8e3f0cb910f8a5b47e6819efcbeb3b21fab0c0bcd461a943b196e750caecd8183c63a1edef8184bf7b0c87291557b77742be93a2be8f10212048358f88c1089b'
Please ensure you restarted your application after installing Devise or setting the key.
looks like some additional settings may be needed, but anyway dockerimage is ready to use
Resolved.
i'l save this done work: https://github.com/Mifrill/railgun/tree/issue_238 https://hub.docker.com/r/mifrill/railgun/
At the moment I'm working on creating a dockerfile. The problem is that we can not run the chrome in headless mode. More precisely, it runs, but our tests, which use the js driver, do not pass. @zharikovpro Perhaps you have thoughts on this matter