“ make rails”在终端中显示语法错误

时间:2019-03-18 22:12:24

标签: ruby-on-rails ruby postgresql

每次运行“ make rails” 时,我都会在终端机中收到语法错误和警告。

我正在使用 ruby​​ 2.1.3p242(2014-09-19修订版47630)[x86_64-darwin18.0] ,因为我正在处理的项目要求使用它,但是如果需要。

这是我制作铁轨 时得到的:

Ahans-MacBook-Pro:app ahansabharwal$ make rails

POSTGRES starting
pg_ctl -D ./db/development.pg -l ./db/development.pg/postgres.log start
waiting for server to start.... done
server started
Connection to localhost port 5432 [tcp/postgresql] succeeded!

SOLR starting
bundle exec rake sunspot:solr:start
/Users/ahansabharwal/.rvm/gems/ruby-2.1.3@project/gems/sass-3.7.2/lib/sass/script/functions.rb:2097: warning: else without rescue is useless
/Users/ahansabharwal/.rvm/gems/ruby-2.1.3@project/gems/sass-3.7.2/lib/sass/script/functions.rb:2103: warning: else without rescue is useless
/Users/ahansabharwal/.rvm/gems/ruby-2.1.3@project/gems/sass-3.7.2/lib/sass/script/functions.rb:2142: warning: else without rescue is useless
rake aborted!
SyntaxError: /Users/ahansabharwal/.rvm/gems/ruby-2.1.3@project/gems/sass-3.7.2/lib/sass/script/functions.rb:2093: syntax error, unexpected modifier_if
          if separator.value == 'auto'
            ^
/Users/ahansabharwal/.rvm/gems/ruby-2.1.3@project/gems/sass-3.7.2/lib/sass/script/functions.rb:2097: syntax error, unexpected ',', expecting keyword_end
/Users/ahansabharwal/.rvm/gems/ruby-2.1.3@project/gems/sass-3.7.2/lib/sass/script/functions.rb:2103: syntax error, unexpected ')', expecting keyword_end
/Users/ahansabharwal/.rvm/gems/ruby-2.1.3@project/gems/sass-3.7.2/lib/sass/script/functions.rb:2138: syntax error, unexpected modifier_if
          if separator.value == 'auto'
            ^
/Users/ahansabharwal/.rvm/gems/ruby-2.1.3@project/gems/sass-3.7.2/lib/sass/script/functions.rb:2142: syntax error, unexpected ')', expecting keyword_end
/Users/ahansabharwal/.rvm/gems/ruby-2.1.3@project/gems/sass-3.7.2/lib/sass/script/functions.rb:2920: syntax error, unexpected keyword_end, expecting end-of-input
.
. (similar syntax errors)
.
(See full trace by running task with --trace)
make[1]: *** [solr-force-start] Error 1
make: *** [solr] Error 2

1 个答案:

答案 0 :(得分:0)

通过安装ruby 2.3.0解决了此问题,SOLR不支持较早的版本。 (我们的项目目前不支持2.6.0及更高版本)