Skip to content

trouble when running 'rails server' in WSL #6129

@SemperEtAnte

Description

@SemperEtAnte

I'm trying to run 'rails server' on jruby 9.2.11.0 with ruby 2.5.7, but always gives such an error. JRuby, rails and all gems installed in Ubuntu subsystem in Windows 10. rails server with only ruby 2.7.0 works fine.

Erros trace:

=> Booting Puma
=> Rails 6.0.2.1 application starting in development
=> Run `rails server --help` for more startup options
Exiting
Errno::EPERM: Operation not permitted - 48
                              initialize at org/jruby/RubyIO.java:999
                                     new at org/jruby/RubyIO.java:876
                              initialize at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:64
                              _configure at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/listen-3.1.5/lib/listen/adapter/linux.rb:31
                               configure at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/listen-3.1.5/lib/listen/adapter/base.rb:45
                                    each at org/jruby/RubyArray.java:1809
                               configure at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/listen-3.1.5/lib/listen/adapter/base.rb:40
                                   start at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/listen-3.1.5/lib/listen/adapter/base.rb:63
                                   start at /home/semperante/.rvm/rubies/jruby-9.2.11.0/lib/ruby/stdlib/forwardable.rb:229
                                Listener at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/listen-3.1.5/lib/listen/listener.rb:68
                           instance_eval at org/jruby/RubyBasicObject.java:2615
                                    call at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/listen-3.1.5/lib/listen/fsm.rb:121
              transition_with_callbacks! at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/listen-3.1.5/lib/listen/fsm.rb:91
                              transition at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/listen-3.1.5/lib/listen/fsm.rb:57
                                   start at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/listen-3.1.5/lib/listen/listener.rb:91
                                   boot! at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/activesupport-6.0.2.1/lib/active_support/evented_file_update_checker.rb:113
                              initialize at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/activesupport-6.0.2.1/lib/active_support/evented_file_update_checker.rb:68
                         initialize_i18n at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/activesupport-6.0.2.1/lib/active_support/i18n_railtie.rb:64
                                 Railtie at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/activesupport-6.0.2.1/lib/active_support/i18n_railtie.rb:22
                            execute_hook at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:69
                  with_execution_control at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:62
                            execute_hook at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:67
                          run_load_hooks at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:52
                                    each at org/jruby/RubyArray.java:1809
                          run_load_hooks at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/activesupport-6.0.2.1/lib/active_support/lazy_load_hooks.rb:51
                                Finisher at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/railties-6.0.2.1/lib/rails/application/finisher.rb:129
                           instance_exec at org/jruby/RubyBasicObject.java:2687
                                     run at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:32
                        run_initializers at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:61
                              tsort_each at /home/semperante/.rvm/rubies/jruby-9.2.11.0/lib/ruby/stdlib/tsort.rb:228
       each_strongly_connected_component at /home/semperante/.rvm/rubies/jruby-9.2.11.0/lib/ruby/stdlib/tsort.rb:350
  each_strongly_connected_component_from at /home/semperante/.rvm/rubies/jruby-9.2.11.0/lib/ruby/stdlib/tsort.rb:431
       each_strongly_connected_component at /home/semperante/.rvm/rubies/jruby-9.2.11.0/lib/ruby/stdlib/tsort.rb:349
                                    each at org/jruby/RubyArray.java:1809
                                    call at org/jruby/RubyMethod.java:131
       each_strongly_connected_component at /home/semperante/.rvm/rubies/jruby-9.2.11.0/lib/ruby/stdlib/tsort.rb:347
                              tsort_each at /home/semperante/.rvm/rubies/jruby-9.2.11.0/lib/ruby/stdlib/tsort.rb:226
                              tsort_each at /home/semperante/.rvm/rubies/jruby-9.2.11.0/lib/ruby/stdlib/tsort.rb:205
                        run_initializers at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:60
                             initialize! at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/railties-6.0.2.1/lib/rails/application.rb:363
                                  <main> at /mnt/d/programs/rubyonrails/ruby_java/config/environment.rb:5
                                 require at org/jruby/RubyKernel.java:974
                        require_relative at org/jruby/RubyKernel.java:1002
                         new_from_string at config.ru:3
                                    eval at org/jruby/RubyKernel.java:1048
                         new_from_string at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/rack-2.2.2/lib/rack/builder.rb:116
                               load_file at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/rack-2.2.2/lib/rack/builder.rb:105
                              parse_file at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/rack-2.2.2/lib/rack/builder.rb:66
       build_app_and_options_from_config at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/rack-2.2.2/lib/rack/server.rb:349
                                     app at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/rack-2.2.2/lib/rack/server.rb:249
                             wrapped_app at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/rack-2.2.2/lib/rack/server.rb:422
                           log_to_stdout at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:77
                                   start at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:37
                                 perform at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:147
                                     tap at org/jruby/RubyKernel.java:1897
                                 perform at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138
                                     run at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/thor-1.0.1/lib/thor/command.rb:27
                          invoke_command at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/thor-1.0.1/lib/thor/invocation.rb:127
                                dispatch at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/thor-1.0.1/lib/thor.rb:392
                                 perform at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/railties-6.0.2.1/lib/rails/command/base.rb:69
                                  invoke at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/railties-6.0.2.1/lib/rails/command.rb:46
                                  <main> at /home/semperante/.rvm/gems/jruby-9.2.11.0/gems/railties-6.0.2.1/lib/rails/commands.rb:18
                                 require at org/jruby/RubyKernel.java:974
                                  <main> at bin/rails:4

The GEMFILE

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.5.7', :engine => 'jruby', :engine_version => '9.2.11.0'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0.2', '>= 6.0.2.1'
# Use postgresql as the database for Active Record
gem "activerecord", " 6.0.2.1"
gem 'activerecord-jdbcpostgresql-adapter', :platform => :jruby
# Use Puma as the app server
gem 'puma', '= 4.3.3'

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.2', require: false

# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
gem 'rack-cors'
group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end

group :development do
  gem 'listen', '>= 3.0.5', '< 3.2'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem 'jwt'
gem 'bcrypt', '~> 3.1.7'

gem 'rails_admin'
gem 'sprockets', '~>3.0'
gem 'rspec-rails'
gem 'rswag-specs'
gem 'rswag-api'
gem 'rswag-ui'
gem 'multipart-post'
gem 'rest-client'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions