Simple_form: rails g simple_form:install hangs with Ruby 2.7.1

Created on 21 Aug 2020  路  4Comments  路  Source: heartcombo/simple_form

Environment

  • Ruby 2.7.1
  • Rails 6.0.3.2
  • Simple Form 5.0.2

Current behavior

After adding simple_form to Gemfile and bundle install, running rails g simple_form:install will not generate any file and the process will keep running forever until you Ctrl+C.

I have searched around and the trick to restart the terminal didn't work either.

If I switched to Ruby 2.6.5, it works.

Most helpful comment

Most likely this is an issue with the Spring gem. Try removing it from your Gemfile, bundle, then try again to install Simple Form.

All 4 comments

I was unable to repro this using Ruby 2.7.1 on a newly generated Rails app:

$ rails g simple_form:install
[Simple Form] Simple Form is not configured in the application and will use the default values. Use `rails generate simple_form:install` to generate the Simple Form configuration.
SimpleForm 3 supports Bootstrap and Zurb Foundation 5. If you want a configuration that is compatible with one of these frameworks, then please re-run this generator with --bootstrap or --foundation as an option.
      create  config/initializers/simple_form.rb
       exist  config/locales
      create  config/locales/simple_form.en.yml
      create  lib/templates/erb/scaffold/_form.html.erb

$ ruby -v
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin19]

$ rails -v
Rails 6.0.3.3

$ bundle info simple_form
  * simple_form (5.0.2)
    Summary: Forms made easy!
    Homepage: https://github.com/heartcombo/simple_form

If you can provide a sample script/app that shows the issue, we will be happy to investigate further. Thanks!

Most likely this is an issue with the Spring gem. Try removing it from your Gemfile, bundle, then try again to install Simple Form.

Per @jaredjackson above, removing the spring gem fixed the problem.

For closure, yes, restarting or stopping spring gem will solve the problem.

Was this page helpful?
0 / 5 - 0 ratings