When building rails6 environment on Ubuntu, it gets stuck with bundle install

When I finish building the environment and do bundle install, I get stuck in various ways

OS is WSL1 Ubuntu (18.04) I proceeded with reference to this.

(Ubuntu) Ruby on rails 6.0 environment construction

nokogiri does not pass

An error occurred while installing nokogiri (1.10.10), and Bundler
cannot continue.
Make sure that `gem install nokogiri -v '1.10.10' --source
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  rails was resolved to 6.0.3.3, which depends on
    actioncable was resolved to 6.0.3.3, which depends on
      actionpack was resolved to 6.0.3.3, which depends on
        actionview was resolved to 6.0.3.3, which depends on
          rails-dom-testing was resolved to 2.0.3, which depends on
            nokogiri

It seems that you can change the bundle config

If you are doing bundle install

gem install nokogiri -- --use-system-libraries

bundle install --path if you have vendor / bundle In the config in the app's .bundle

.bundle


BUNDLE_BUILD__NOKOGIRI: "--use-system-libraries"

Is added.

bootsnap does not pass

An error occurred while installing bootsnap (1.4.8), and Bundler
cannot continue.
Make sure that `gem install bootsnap -v '1.4.8' --source
'https://rubygems.org/'` succeeds before bundling.

Apparently it would be nice to lower the version

Gemfile


gem 'bootsnap', '<= 1.1.0', require: false

I should have done it with this.

msgpack does not pass

An error occurred while installing msgpack (1.3.3), and Bundler
cannot continue.
Make sure that `gem install msgpack -v '1.3.3' --source
'https://rubygems.org/'` succeeds before bundling.

Apparently

Permission denied @ rb_file_s_rename.....

So messing with gems permissions in the app's venfor / bundle

sudo chown -R username /home/username/testrails/railsapp/vendor/bundle/ruby/2.7.0/gems

The path depends on the environment.

Puma does not enter

bundle/config


BUNDLE_BUILD__PUMA: "--with-cflags=-Wno-error=implicit-function-declaration"

To .bundle / config

$ bundle config build.puma --with-cflags="-Wno-error=implicit-function-declaration"

You should be able to go either way.

When something else comes out

I think there are many causes related to authority, so I think you should check first.

Recommended Posts

When building rails6 environment on Ubuntu, it gets stuck with bundle install
Rails again. It gets stuck with Homebrew immediately.
When I used Slick on Rails, it competed with Turbolinks.
Install ruby on Ubuntu 20.04 with rbenv
How to install Pry after building Rails development environment with Docker
Building Rails 6 and PostgreSQL environment with Docker
[Ruby] Building a Ruby development environment on Ubuntu
[Rails] Could not locate Gemfile with bundle install
Error in bundle install when running rails new
Notes on building Rails6 / PostgreSQL with Docker Compose
A memorandum when building an environment with Ruby3.0 x Rails6.1 x Docker x CentOS Stream
A memo when building a Rails 5.2 development environment using Docker Desktop + WSL2 on Windows 10 Home
Install mecab-ipadic-neologd on Sakura VPS (ubuntu18.04) with low memory and use it from python
Bundle install with docker + rails6 does not reflect gem
Install rbenv with apt on ubuntu and put ruby
Install pyqt5 on ubuntu
Install Gradle with ubuntu16.04
Error when bundle install
Install Autoware on Ubuntu 18.04.5
Install Homebrew on Ubuntu 20.04
[It takes 3 minutes] When I tried to install VS Code on Ubuntu 18.04, it was unexpectedly easy.
How to set environment variables when using Payjp with Rails
Difficulties in building a Ruby on Rails environment (Windows 10) (SQLite3)
Build mate desktop environment on ec2 with terraform (Ubuntu 20.04LTS)
[Java development environment construction] Install OpenJDK 11 (Java 11) on macOS with Homebrew.
Building an environment for creating apps with Rails and Vue
Measures for permissions when building MySQL with Docker on WSL2
Install Docker on Ubuntu Server 20.04
Rails6 (MySQL, Ubuntu environment, Cloud9)
Install Sidekiq pro on Rails
Install zabbix agent (5.0) on Ubuntu 18.04
Install Arudino IDE on Ubuntu 20
Install Ubuntu Desktop 20.10 on RaspberryPi4
Install Rails on macOS Catalina
[Docker] Rails 5.2 environment construction with docker
Install raspi-config on Ubuntu 20.04 (LTS)
Install WordPress 5.5 on Ubuntu 20.04 LTS
Note: Install PostgreSQL 9.5 on Ubuntu 18.04
Install Cloud9 on Raspberry pi 4 and set up Rails development environment
Ruby on Rails development environment construction with Docker + VSCode (Remote Container)
Procedure for building a Rails application development environment with Docker [Rails, MySQL, Docker]
Building a haskell environment with Docker + VS Code on Windows 10 Home
[Environment construction] Error when bundle install Errno :: EACCES: Permission denied @ dir_s_mkdir-
How to install Adopt OpenJDK on Debian, Ubuntu with apt (-get)
Create a development environment for Ruby 3.0.0 and Rails 6.1.0 on Ubuntu 20.04.1 LTS
Steps to build a Ruby on Rails development environment with Vagrant
Install Ubuntu Server 20.04 in VirtualBox on Mac and connect with SSH