Rails does not start server in Ubuntu

0

I am starting to use Rails, and I can not raise the server with the rails s command, I have installed rails 5.1.1 and until a couple of days ago everything worked fine, but now it sends me the following error every time I try to start it:

=> Booting Puma
=> Rails 5.1.1 application starting in development on http://localhost:3000
=> Run 'rails server -h' for more startup options 

Exiting /var/lib/gems/2.3.0/gems/puma-3.9.0/lib/puma/launcher.rb:166:in 'run': undefined method 'clean_env' for Bundler:Module (NoMethodError)
Did you mean?  clean_exec  
  from /var/lib/gems/2.3.0/gems/puma-3.9.0/lib/rack/handler/puma.rb:69:in 'run'   
  from /var/lib/gems/2.3.0/gems/rack-2.0.3/lib/rack/server.rb:297:in 'start'
  from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/commands/server/server_command.rb:44:in 'start'
  from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/commands/server/server_command.rb:131:in 'block in perform'
  from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/commands/server/server_command.rb:126:in 'tap' 
  from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/commands/server/server_command.rb:126:in 'perform'   
  from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/command.rb:27:in 'run'   
  from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in 'invoke_command'  
  from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor.rb:369:in 'dispatch'   
  from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/command/base.rb:63:in 'perform'  
  from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/command.rb:44:in 'invoke'  
  from /var/lib/gems/2.3.0/gems/railties-5.1.1/lib/rails/commands.rb:16:in '<top (required)>'   
  from /home/kurt/Documents/blog/bin/rails:9:in 'require'   
  from /home/kurt/Documents/blog/bin/rails:9:in '<top (required)>' 
  from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in 'load'
  from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in 'call'
  from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in 'call'   
  from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/client.rb:30:in 'run'   
  from /var/lib/gems/2.3.0/gems/spring-2.0.2/bin/spring:49:in '<top (required)>'
  from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in 'load'   
  from /var/lib/gems/2.3.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in '<top (required)>'   
  from /usr/local/lib/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in 'require'   
  from /usr/local/lib/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in 'require'   
  from /home/kurt/Documents/blog/bin/spring:15:in '<top (required)>'  from bin/rails:3:in 'load'  
  from bin/rails:3:in '<main>'

I do not understand what is happening.

EDIT: gemfile

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

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]
  # Adds support for Capybara system testing and selenium driver
  gem 'capybara', '~> 2.13'
  gem 'selenium-webdriver'
end

group :development do
  # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
  gem 'web-console', '>= 3.3.0'
  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]

gemfile.lock:

GEM
  remote: https://rubygems.org/
  specs:
    actioncable (5.1.1)
      actionpack (= 5.1.1)
      nio4r (~> 2.0)
      websocket-driver (~> 0.6.1)
    actionmailer (5.1.1)
      actionpack (= 5.1.1)
      actionview (= 5.1.1)
      activejob (= 5.1.1)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 2.0)
    actionpack (5.1.1)
      actionview (= 5.1.1)
      activesupport (= 5.1.1)
      rack (~> 2.0)
      rack-test (~> 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.2)
    actionview (5.1.1)
      activesupport (= 5.1.1)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.0.3)
    activejob (5.1.1)
      activesupport (= 5.1.1)
      globalid (>= 0.3.6)
    activemodel (5.1.1)
      activesupport (= 5.1.1)
    activerecord (5.1.1)
      activemodel (= 5.1.1)
      activesupport (= 5.1.1)
      arel (~> 8.0)
    activesupport (5.1.1)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (~> 0.7)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
    addressable (2.5.1)
      public_suffix (~> 2.0, >= 2.0.2)
    arel (8.0.0)
    bindex (0.5.0)
    builder (3.2.3)
    byebug (9.0.6)
    capybara (2.14.0)
      addressable
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      xpath (~> 2.0)
    childprocess (0.7.0)
      ffi (~> 1.0, >= 1.0.11)
    coffee-rails (4.2.2)
      coffee-script (>= 2.2.0)
      railties (>= 4.0.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.12.2)
    concurrent-ruby (1.0.5)
    erubi (1.6.0)
    execjs (2.7.0)
    ffi (1.9.18)
    globalid (0.4.0)
      activesupport (>= 4.2.0)
    i18n (0.8.4)
    jbuilder (2.6.4)
      activesupport (>= 3.0.0)
      multi_json (>= 1.2)
    listen (3.1.5)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
      ruby_dep (~> 1.2)
    loofah (2.0.3)
      nokogiri (>= 1.5.9)
    mail (2.6.5)
      mime-types (>= 1.16, < 4)
    method_source (0.8.2)
    mime-types (3.1)
      mime-types-data (~> 3.2015)
    mime-types-data (3.2016.0521)
    mini_portile2 (2.1.0)
    minitest (5.10.2)
    multi_json (1.12.1)
    nio4r (2.1.0)
    nokogiri (1.7.2)
      mini_portile2 (~> 2.1.0)
    public_suffix (2.0.5)
    puma (3.9.0)
    rack (2.0.3)
    rack-test (0.6.3)
      rack (>= 1.0)
    rails (5.1.1)
      actioncable (= 5.1.1)
      actionmailer (= 5.1.1)
      actionpack (= 5.1.1)
      actionview (= 5.1.1)
      activejob (= 5.1.1)
      activemodel (= 5.1.1)
      activerecord (= 5.1.1)
      activesupport (= 5.1.1)
      bundler (>= 1.3.0, < 2.0)
      railties (= 5.1.1)
      sprockets-rails (>= 2.0.0)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.0.3)
      loofah (~> 2.0)
    railties (5.1.1)
      actionpack (= 5.1.1)
      activesupport (= 5.1.1)
      method_source
      rake (>= 0.8.7)
      thor (>= 0.18.1, < 2.0)
    rake (12.0.0)
    rb-fsevent (0.9.8)
    rb-inotify (0.9.8)
      ffi (>= 0.5.0)
    ruby_dep (1.5.0)
    rubyzip (1.2.1)
    sass (3.4.24)
    sass-rails (5.0.6)
      railties (>= 4.0.0, < 6)
      sass (~> 3.1)
      sprockets (>= 2.8, < 4.0)
      sprockets-rails (>= 2.0, < 4.0)
      tilt (>= 1.1, < 3)
    selenium-webdriver (3.4.0)
      childprocess (~> 0.5)
      rubyzip (~> 1.0)
      websocket (~> 1.0)
    spring (2.0.2)
      activesupport (>= 4.2)
    spring-watcher-listen (2.0.1)
      listen (>= 2.7, < 4.0)
      spring (>= 1.2, < 3.0)
    sprockets (3.7.1)
      concurrent-ruby (~> 1.0)
      rack (> 1, < 3)
    sprockets-rails (3.2.0)
      actionpack (>= 4.0)
      activesupport (>= 4.0)
      sprockets (>= 3.0.0)
    sqlite3 (1.3.13)
    thor (0.19.4)
    thread_safe (0.3.6)
    tilt (2.0.7)
    turbolinks (5.0.1)
      turbolinks-source (~> 5)
    turbolinks-source (5.0.3)
    tzinfo (1.2.3)
      thread_safe (~> 0.1)
    uglifier (3.2.0)
      execjs (>= 0.3.0, < 3)
    web-console (3.5.1)
      actionview (>= 5.0)
      activemodel (>= 5.0)
      bindex (>= 0.4.0)
      railties (>= 5.0)
    websocket (1.2.4)
    websocket-driver (0.6.5)
      websocket-extensions (>= 0.1.0)
    websocket-extensions (0.1.2)
    xpath (2.1.0)
      nokogiri (~> 1.3)

PLATFORMS
  ruby

DEPENDENCIES
  byebug
  capybara (~> 2.13)
  coffee-rails (~> 4.2)
  jbuilder (~> 2.5)
  listen (>= 3.0.5, < 3.2)
  puma (~> 3.7)
  rails (~> 5.1.1)
  sass-rails (~> 5.0)
  selenium-webdriver
  spring
  spring-watcher-listen (~> 2.0.0)
  sqlite3
  turbolinks (~> 5)
  tzinfo-data
  uglifier (>= 1.3.0)
  web-console (>= 3.3.0)

BUNDLED WITH
   1.15.0
    
asked by Kurt Norenbergs 02.06.2017 в 01:52
source

1 answer

0

Unfortunately it seems to be a bug in puma (in fact they already lifted a ticket in github , you can see it here ).

You may try to use an earlier version of puma ( 3.7.0 ) while the error is resolved, but I advise you to try it in a new application.

    
answered by 02.06.2017 / 03:18
source