How to install Pry after building Rails development environment with Docker

environment

macOS 10.15.5 Rails 5.2.4.2 Docker 19.03.12

Introduction

After building the Rails development environment with Docker, I try to use Console. The IRB is displayed as shown below.

irb(main):001:0>

However, I will show you how to install ** Pry **, which is useful for Rails development, after building a Rails development environment with Docker.

Add Gemfile

Gemfile


gem "pry-rails"
gem "pry-byebug"

terminal


$ bundle install

Then try running the Console.

terminal


$ rails console

However, an error occurred and the following message was displayed at the end of the error statement.

terminal


`autodetect': Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

It looks like a "JavaScript runtime not found" error. So I tried to install node.js. Install node.js using homebrew.

terminal


$ brew install nodejs

Then run the console.

$ rails console
[1] pry(main)>

We have successfully installed and implemented Pry!

Recommended Posts

How to install Pry after building Rails development environment with Docker
How to build Rails, Postgres, ElasticSearch development environment with Docker
How to build Rails 6 environment with Docker
[Rails] How to build an environment with Docker
How to build a Ruby on Rails development environment with Docker (Rails 6.x)
How to build a Ruby on Rails development environment with Docker (Rails 5.x)
[Rails] [Docker] Copy and paste is OK! How to build a Rails development environment with Docker
Building Rails 6 and PostgreSQL environment with Docker
[Rails] How to use rails console with docker
Procedure for building a Rails application development environment with Docker [Rails, MySQL, Docker]
How to build Rails + Vue + MySQL environment with Docker [2020/09 latest version]
How to install Docker
Rails6.0 ~ How to create an eco-friendly development environment
How to execute with commands of normal development language in Docker development environment
How to build docker environment with Gradle for intelliJ
[Rails] How to install devise
[Docker environment] How to deal with ActiveSupport :: MessageEncryptor :: InvalidMessage
[Rails] How to deal with URL changes after render
[Docker] Rails 5.2 environment construction with docker
How to build Java development environment with VS Code
[Rails] How to install simple_calendar
[Rails] How to install reCAPTCHA
[Docker + Rails] How to deal with Rails server startup failure
How to install Docker in the local environment of an existing Rails application [Rails 6 / MySQL 8]
How to quit Docker for Mac and build a Docker development environment with Ubuntu + Vagrant
What to do when routing settings do not work after building Docker environment with Laravel
[Rough explanation] How to separate the operation of the production environment and the development environment with Rails
How to set environment variables when using Payjp with Rails
I made a development environment with rails6 + docker + postgreSQL + Materialize.
How to build [TypeScript + Vue + Express + MySQL] environment with Docker ~ Express ~
Rails application development environment construction with Docker [Docker, Rails, Puma, Nginx, MySQL]
I tried to create a padrino development environment with Docker
Rails + MySQL environment construction with Docker
[Rails] How to install Font Awesome
Build environment with vue.js + rails + docker
Build Rails environment with Docker Compose
[Rails] How to install ImageMagick (RMajick)
[Rails] How to install Font Awesome
[Environment construction with Docker] Rails 6 & MySQL 8
How to get along with Rails
How to start Camunda with Docker
How to install Swiper in Rails
Ruby on Rails development environment construction with Docker + VSCode (Remote Container)
Super beginner builds Rails6 + Postgresql environment with Docker to the end
How to build [TypeScript + Vue + Express + MySQL] environment with Docker ~ MySQL edition ~
PostgreSQL environment construction with Docker (from setup to just before development)
Steps to build a Ruby on Rails development environment with Vagrant
How to build [TypeScript + Vue + Express + MySQL] environment with Docker ~ Sequelize ~
How to share files with Docker Toolbox
Rails environment construction with Docker (personal apocalypse)
Create Rails 6 + MySQL environment with Docker compose
[Docker] Building an environment to use Hugo
Migrate existing Rails 6 apps to Docker environment
Deploy to heroku with Docker (Rails 6, MySQL)
Create Spring Boot-gradle-mysql development environment with Docker
[Docker] Development environment construction Rails6 / Ruby2.7 / MySQL8
How to build an environment with Docker, which is the minimum required to start a Rails application
Build a Wordpress development environment with Docker
Lightweight PHP 7.4 development environment created with Docker
How to run Blazor (C #) with Docker
Build debug environment on container --Build local development environment for Rails tutorial with Docker-