Search code examples
ruby-on-railsrailsinstaller

How fix rails errors installation?


When Running this command

rails new test --api

I found this error

/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-6.0.2.1/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt:10: syntax error, unexpected ')', expecting end-of-input (SyntaxError));  if spring_install?

what is the solution??


Solution

  • this error face in 2.5.0 version , so you can install ruby 2.5.3

    rbenv install -l
    

    this will tell you the versions of ruby like that

    2.5.0
    2.5.1
    2.5.2
    2.5.3
    2.5.4
    2.5.5
    2.5.6
    2.5.7
    

    then run this

    rbenv install 2.5.3
    rbenv global 2.5.3
    gem install rails