burke / zeus

Boot any rails app in under a second.
MIT License
3.33k stars 231 forks source link

zeus crash on start in ruby 2.5.0 #651

Open AndrzejJantos opened 6 years ago

AndrzejJantos commented 6 years ago

[ready] [crashed] [running] [connecting] [waiting]
boot
└── default_bundle
    ├── development_environment
    │   └── prerake
    └── test_environment
        └── test_helper

Available Commands: [waiting] [crashed] [ready]
zeus console (alias: c)
zeus server (alias: s)
zeus generate (alias: g)
zeus destroy (alias: d)
zeus dbconsole
zeus rake
zeus runner (alias: r)
zeus test (alias: rspec, testrb)
exit status 1```

Zeus crash on start in ruby 2.5.0.
ragesoss commented 6 years ago

Confirmed. My app runs zeus without error on Ruby 2.3.1, but crashes like this on Ruby 2.5.0.

mcordell commented 6 years ago

Also confirmed. Running with logging shows the below:

2018/01/19 12:23:29.429638 [/Users/phil/Source/go/src/github.com/burke/zeus/go/processtree/slavenode.go:149] test_environment/(no PID) entering state SUnbooted
2018/01/19 12:23:29.429666 [/Users/phil/Source/go/src/github.com/burke/zeus/go/processtree/slavenode.go:149] development_environment/(no PID) entering state SUnbooted
2018/01/19 12:23:29.429663 [/Users/phil/Source/go/src/github.com/burke/zeus/go/processtree/slavenode.go:149] prerake/(no PID) entering state SUnbooted
2018/01/19 12:23:29.429687 [/Users/phil/Source/go/src/github.com/burke/zeus/go/processtree/slavenode.go:149] test_helper/(no PID) entering state SUnbooted
2018/01/19 12:23:29.429707 [/Users/phil/Source/go/src/github.com/burke/zeus/go/processtree/slavenode.go:149] boot/(no PID) entering state SUnbooted
2018/01/19 12:23:29.429717 [/Users/phil/Source/go/src/github.com/burke/zeus/go/processtree/slavenode.go:149] default_bundle/(no PID) entering state SUnbooted
2018/01/19 12:23:29.430329 [/Users/phil/Source/go/src/github.com/burke/zeus/go/processtree/slavenode.go:391] boot/(no PID) running the root command now
2018/01/19 12:23:29.527776 [/Users/phil/Source/go/src/github.com/burke/zeus/go/processtree/slavenode.go:402] boot/(no PID) root process exited with an error before it could boot: exit status 1; output was: /Users/michael/.rubies/ruby-2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- ubygems (LoadError)
        from /Users/michael/.rubies/ruby-2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
AndrzejAngryNerds commented 6 years ago

Any update on this?

yld commented 6 years ago

Editing zeus.json according to https://github.com/burke/zeus/issues/237#issuecomment-357047144 resolve the problem. Credits to @skopu

You can also find the source of any other problem occuring using the given command: ruby -r rubygems -r./custom_plan -eZeus.go

FelixFortis commented 6 years ago

gem update --system worked for me

sankalpk commented 6 years ago

Running the following in the terminal worked for me:

export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

arich55 commented 6 years ago

If anyone is still having issues with this, follow the advise from the comment here: https://github.com/burke/zeus/issues/237#issuecomment-103735729 to properly identify the issue.

zeus --log ZEUS.LOG start then cat ZEUS.LOG

In one case, after running zeus init and updating the command argument in ./custom_plan.rb from: "command": "ruby -rubygems -r./custom_plan -eZeus.go", to: "command": "ruby -r rubygems -r ./custom_plan -e Zeus.go",

resolved this issue.