尝试启动 staytus 时出现 procodile 语法错误

尝试启动 staytus 时出现 procodile 语法错误

在 AWS 上运行 Ubuntu 来验证 staytus 的概念。我非常绿色,已经解决了大部分问题才到达这一点。

staytus 教程是我一直在关注的,也许是我缺乏技能,但我发现它还不够完善。

除了教程建议之外,我还必须完成一些事情才能继续安装

CREATE DATABASE `staytus` CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER `staytus`@`127.0.0.1` IDENTIFIED BY '*********';
GRANT ALL ON `staytus`.* TO `staytus`@`127.0.0.1`;

staytus:

Ruby 1.99 was installed did this and got ruby 2.4

sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get install ruby2.4
sudo apt-get install ruby2.4-dev

need to update gemfile to show ruby '2.4.4' and then gem install bundler

我得到的最后一个错误

ubuntu@ip-172-31-26-129:/opt/staytus/staytus$ sudo -u staytus procodile start --dev
/var/lib/gems/1.9.1/gems/procodile-1.0.19/lib/procodile/cli.rb:160: warning: else without rescue is useless
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': /var/lib/gems/1.9.1/gems/procodile-1.0.19/lib/procodile/cli.rb:57: syntax error, unexpected keyword_do_block, expecting keyword_end (SyntaxError)
...ort_by { |k,v| k.to_s }.each do |method, options|
...                               ^
/var/lib/gems/1.9.1/gems/procodile-1.0.19/lib/procodile/cli.rb:57: syntax error, unexpected '|', expecting '='
/var/lib/gems/1.9.1/gems/procodile-1.0.19/lib/procodile/cli.rb:144: syntax error, unexpected keyword_do_block, expecting keyword_end
          instances.each do |instance|
                           ^
/var/lib/gems/1.9.1/gems/procodile-1.0.19/lib/procodile/cli.rb:145: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
            puts "Started".color(32) + " #{inst...
                  ^
/var/lib/gems/1.9.1/gems/procodile-1.0.19/lib/procodile/cli.rb:155: syntax error, unexpected keyword_do_block, expecting keyword_end
...upervisor(@config, @options) do |supervisor|
...                               ^
/var/lib/gems/1.9.1/gems/procodile-1.0.19/lib/procodile/cli.rb:162: syntax error, unexpected keyword_end, expecting $end
        from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /var/lib/gems/1.9.1/gems/procodile-1.0.19/bin/procodile:16:in `<top (required)>'
        from /usr/local/bin/procodile:23:in `load'
        from /usr/local/bin/procodile:23:in `<main>'

我之前尝试安装时曾看到过此错误块,但它们无法通过 Google 找到。提前感谢您的帮助

答案1

使用此命令可以解决您的问题

gem install procodile

我也遇到了同样的问题。上面的方法解决了这个问题

相关内容