LoginSignup
0
0

More than 3 years have passed since last update.

Railsのサーバーが起動できない時の対処法

Last updated at Posted at 2020-11-15

はじめに

初めまして。
私は未経験エンジニアとして転職するべく、1週間前にMacBookProを購入し、Progateで学習をしている者です。
早速ですが、Ruby on Railsの環境構築をする時に詰みました。

rails s が起動しない

Progateに言われるがままAtom, Homebrew, rbenv, Railsをインストールし、後はローカルでサーバーを建てるだけ。
しかし、

rails s

と入力すると

Could not find gem 'rails (~> 6.0.3, >= 6.0.3.4)' in any of the gem sources listed in your Gemfile.
Run `bundle install` to install missing gems.

何のことやら。
とりあえず

bundle install

と入力しろと書いてあるので実行してみます。

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

初学者の心を折りに来ています。
Google先生に聞くこと数時間、

sudo gem install bindex -v '0.8.1'

これでパスワードを入力してインストールすれば良いみたいです。
さて、再度bundle installを実行すると、

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.

またですか。
しかし、同じように

sudo gem install msgpack -v '1.3.3'

でインストールしていきます。
このあともbundle installを実行しては足りないものをインストールする作業を繰り返していき、最終的にはrails sが実行できるようになりました。

おわりに

私のように出鼻をくじかれている方の助けになれば幸いです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0