[RUBY] Install Cloud9 on Raspberry pi 4 and set up Rails development environment


Nice to meet you for the first time! People who know the Hello! It is Atie who masters programming by self-education! Today, I will install Cloud9 on Raspberry pi 4 (hereinafter referred to as Raspberry Pi) and prepare the development environment for Rails Tutorial. Originally, the first chapter was in a cloud development environment, but since it was a free plan, I could only use it a little, and even better, I thought about installing Cloud9 on Raspberry Pi. Then!


Server: Raspberrypi4 4GB model OS: Raspberry Pi OS Lite Release date: December 2nd 2020 Main PC: Surface pro 7 Main PC OS: Fedora32 Workstation

1. Raspberry Pi setup

First of all, I will set up the Raspberry Pi

OS image download

I tried to use RaspiImager, but my OS is Fedora, so I downloaded "Rasbian lite" from Official Site with Torrent.


I will initialize it for the time being Screenshot from 2020-12-25 05-53-19.png

Next, I will write the image Screenshot from 2020-12-25 05-53-42.png

Here, select the Rasbian Lite img that you downloaded and unzipped earlier. Screenshot from 2020-12-25 05-54-17.png

Writing ... Screenshot from 2020-12-25 05-54-34.png

Raspberry Pi startup and initial settings

Since I was able to write, insert the MicroSD card into the Raspberry Pi and start it The username is pi and the initial password is raspberry After logging in, change your password to improve security

$ passwd
#First once the initial password"raspberry"And then enter the new password twice

Then connect to the internet

$ sudo raspi-config

Select S1 Wireless LAN from 1 System Option and then select the country where you live Find Japan and Enter Next, set the wifi ESSID. After entering the ESSID, enter the wifi password next. This completes the internet settings Next, we will set the location etc. Select Locale JP UTF-8 from Localization Option 5 Then select Time Zone from 5 to L2 Select Asia ▶ Tokyo in order I will set the keyboard from 5 to L3 again Select Generic 105-key PC and select Orther, Japanese Select Japanese, default, No compose key in order This completes the location settings Next, we will set up ssh Select P2 ssh from 3 Intertface Options, select Yes I will make an ssh connection

$ ip a

Check the IP address with and make an ssh connection

$ ssh [email protected] Pi ip address

Enter your Raspberry Pi password to log in I will update when I can log in

$ sudo apt update && sudo apt upgrade

It's long, but wait patiently I will install Cloud9 when finished

Cloud9 installation

First, install Git

$ sudo apt install git

Now that Git has been installed, it's time to install Cloud9. It is published on Girhub so it is easy to install Execute the following command

$ wget https://raw.githubusercontent.com/chintanp/Cloud9-on-RPi/master/c9_bash_RPi.sh
$ chmod 755 ./c9_bash_RPi.sh
$ sudo ./c9_bash_RPi.sh

It's quite long, so wait patiently

Installing ...

After installation, you can use Cloud9 by accessing http: // Raspberry Pi IP address: 8181.

Install Ruby, Rails, Python

I will install it at once

$ sudo apt-get install pip3
$ sudo apt-get install libatlas-base-dev
$ cd ~
$ git clone git://github.com/sstephenson/rbenv.git .rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ cd .rbenv
$ mkdir plugins
$ cd .plugins
$ git clone git://github.com/sstephenson/ruby-build.git
$ cd ~
$ source .bash_profile
$ sudo apt-get install autoconf
$ sudo apt-get install libssl-dev libyaml-dev
$ sudo apt-get install bison build-essential
$ sudo apt-get install libreadline6-dev
$ sudo apt-get install libncurses5-dev
$ rbenv install 2.7.2
$ rbenv rehash
$ rbenv global 2.4.2

The installation is now complete Next is Rails

$ gem install bundler
$ gem install rails

That's all! !!


Thank you for watching! This time I installed Rails on Cloud9, but you can also build a development environment by adding C and Go etc. TwitterAtie's Twitter See you in the next article!


https://note.com/yuza_cc/n/need631d07a89 https://qiita.com/tyanpey/items/ca086a85d5f7e7ca54ca https://qiita.com/orihomotakanat/items/b4a983617f64d4768b7c

Recommended Posts

Install Cloud9 on Raspberry pi 4 and set up Rails development environment
Install Docker on Raspberry Pi 4 and Raspberry Pi OS 64bit
Build a Ruby on Rails development environment on AWS Cloud9
Install MariaDB on Raspberry Pi OS
Install Java development environment on Mac
Install Docker and docker-compose on Raspberry Pi 4, Linux (Debian) and Windows 10, respectively
Install Rails in the development environment and create a new application
Create a development environment for Ruby 3.0.0 and Rails 6.1.0 on Ubuntu 20.04.1 LTS
Install Docker on Ubuntu and set up remote connection using tls
Headless install of Ubuntu 20.10 on Raspberry Pi
Build Java 8 development environment on AWS Cloud9
Install CentOS 7 on Raspberry pi 4 Model B
Build and install Wireshark Development Release (3.3.1) on Ubuntu
Install Ubuntu Core 18 on Raspberry Pi 2 Model B
Rails development environment created with VSCode and devcontainer
Ruby on Rails development environment construction on M1 Mac
[Beginner] Install java development tool in cloud9 development environment.
Install Ubuntu 20.04 in virtual box on windows10 and build a development environment using docker
Build Ubuntu 20.04 LTS desktop environment on Raspberry Pi 4 (+ Japanese)
[Environment construction] Ruby on Rails 5.2 system development environment construction [within 1 hour]
Java development environment construction on Mac-JDK Install (2020 preservation version)
Docker the development environment of Ruby on Rails project
Steps to set up Postfix and Dovecot on CentOS 8.3
[Procedure 1 for beginners] Ruby on Rails: Construction of development environment
[Environment construction] Get the Ruby on Rails 6 development environment within 1 hour
How to set and describe environment variables using Rails zsh
Set up Django on Ubuntu 16.04 with PostgreSQL and Gunicorn on ECS
[Java development environment construction] Install OpenJDK 11 (Java 11) on macOS with Homebrew.
Rails6 development environment construction [Mac]
Put Ubuntu 20.04.1 on Raspberry Pi 4
Rails6 (MySQL, Ubuntu environment, Cloud9)
Install Sidekiq pro on Rails
Set up Gitolite on CentOS 7
Install Rails on macOS Catalina
Set up ansible-playbook on Ubuntu 20.04
Minecraft server on Raspberry Pi 4
Ruby on Rails --From environment construction to simple application development on WSL2
Ruby on Rails development environment construction with Docker + VSCode (Remote Container)
How to install Pry after building Rails development environment with Docker
Create Dockerfile, docker-compose.yml and run nodejs on windows10, Linux, Raspberry Pi
Build a development environment where Ruby on Rails breakpoints work on Windows
Notes on building Kotlin development environment and migrating from Java to Kotlin
Steps to build a Ruby on Rails development environment with Vagrant
[Ruby on Rails] yarn install --check-files
Install JDK and JRE on Ubuntu 16.10
Try putting CentOS 8 on Raspberry Pi 3
Note: setting javaMail on Raspberry Pi
Ruby on Rails 6.0 environment construction memo
Install and configure jenv on macOS
Rails on Docker environment construction procedure
[Today's stack # 1] Until on rails on cloud9
Install Java 9 on windows 10 and CentOS 7
Build Unity development environment on docker
Build debug environment on container --Build local development environment for Rails tutorial with Docker-
Let's install Docker on Windows 10 and create a verification environment for CentOS 8!
Minimal steps to set up a Ruby environment with rbenv on Ubuntu 20.04
Building a development environment for Flutter on Win10 --- Flutter SDK Install (2020 preservation version)
How to build a Ruby on Rails development environment with Docker (Rails 6.x)
Environment construction of Ruby on Rails from 0 [Cloud9] (From Ruby version change to Rails installation)
How to build a Ruby on Rails development environment with Docker (Rails 5.x)
Ruby on Rails ✕ Docker ✕ MySQL Introducing Docker and docker-compose to apps under development