skip to Main Content

I can’t start my rails app after installing Ubuntu 20.04

There is traceback.

Also, I have the same errors:

...rbenv/versions/2.6.3/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::...

then I’ve checked my rails version.

After reinstall my OS via erase, I have restored my backup of /home from Ubuntu 18.04
and checked my version of ruby rails and nodejs. Ruby and rails were the same, but I have to install nodejs and some postgres packages. Now, after that I’ve tried to run rails s in my project folder and there errors from traceback were appeared. Also, the command

yarn install --check-files

can’t finish successfully, cause

info There appears to be trouble with your network connection. Retrying... error.

What should I do to start my app successfully?

My gemfile:

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

ruby '2.6.3'

gem "rails_12factor"
# gem "hashid-rails", "~> 1.0"
gem 'dotenv-rails', groups: [:development, :test]
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0.2', '>= 6.0.2.2'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
# Use Puma as the app server
gem 'puma', '~> 4.1'
# Use SCSS for stylesheets
# gem 'sass-rails', '>= 6'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 4.0'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'
gem 'pry'

# Use Active Storage variant
# gem 'image_processing', '~> 1.2'

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

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]
  gem 'rspec-rails'
  gem 'database_cleaner'
  gem 'selenium-webdriver'
end

group :development do
  # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
  gem 'web-console', '>= 3.3.0'
  gem 'listen', '>= 3.0.5', '< 3.2'
end

gem 'minitest-rails'

group :test do
  gem 'minitest-rails-capybara'
  gem 'capybara', '>= 2.15'
end

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

gem "active_model_serializers"

Ruby: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]

Rails: Rails 6.0.2.2

Nodejs: v10.19.0

3

Answers


  1. Chosen as BEST ANSWER

    Okey, after post of @Bodh1004 I have an idea to do the same action with ffi gem, and this is works! Thanks for the idea! Anyway, i have the same already initialized constant errors:

    /home/procy/.rbenv/versions/2.6.3/lib/ruby/2.6.0/forwardable.rb:116: warning: already initialized constant Forwardable::VERSION
    /home/procy/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/forwardable-1.3.1/lib/forwardable/version.rb:3: warning: previous definition of VERSION was here
    /home/procy/.rbenv/versions/2.6.3/lib/ruby/2.6.0/forwardable.rb:117: warning: already initialized constant Forwardable::FORWARDABLE_VERSION
    /home/procy/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/forwardable-1.3.1/lib/forwardable/version.rb:4: warning: previous definition of FORWARDABLE_VERSION was here
    

    I'll try to solve them.


  2. run `gem uninstall etc` 
    

    and then gem update etc --default

    Login or Signup to reply.
  3. Remove yarn.lock and log errors
    And repeat

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search