Simple Rails App: Error Cannot visit Integer

前端 未结 3 1072
温柔的废话
温柔的废话 2021-01-07 17:15

I am trying to build a simple Rails app. Rails v3.2.22.5 (it is a requirement). I am running it with PostgreSQL. When I start the server however I get the following error wh

3条回答
  •  庸人自扰
    2021-01-07 17:16

    The version of Ruby you're using (2.4.1) is not compatible with the version of Rails you're using (3.2.22.5). That version of Ruby requires at least Rails 5. Try downgrading to Ruby 2.3 or lower. You can use a Ruby version manager (i.e. rvm, rbenv or chruby) to control which Ruby is used when launching your application.

    Edit

    Just noticed you're already using rbenv from your stack trace. Add a .ruby-version file to your application's directory containing the following line:

    2.3.4
    

    Once you re-enter that directory, confirm the version via:

    $> ruby -v
    ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-darwin16]
    

    (or similar version) before launching rails.

提交回复
热议问题