0
0

More than 3 years have passed since last update.

cloud9でbundle installで再構築出来ず、gemfile.lockを削除とMysqlなのにPostgresqlインストールしたら解決した話。

Last updated at Posted at 2020-02-09

EC2のインスタンスを、停止すべきところを間違って終了押してしまい、後の祭り。。
cloud9で再構築使用とgit cloneしたが、再構築しようとしたらいろいろハマったので忘備録として。

You must use Bundler 2 or greater with this lockfile.

gemfile.lockを削除して、Bundler2系をインストール出来るようにします。

bundle install
Your Ruby version is 2.6.3, but your Gemfile specified 2.5.3

またもエラー分が、今度はインストールするrubyバージョンが、君が使用しているバージョンとは違うよーとの事なので、直接修正。

bundle install

またエラー。。

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

In Gemfile:
  pg

エラー分にある通り、

$gem install pg -v '1.2.2'

しましたが、エラーは変わらず。。

Mysqlを使ってましたが、どうやらPostgresqlがインストールされていないことが原因とのことらしく、
こちらの記事を参考にPostgresqlがインストールしました。
https://qiita.com/oke-py/items/75333cf564480d062006

sudo yum install postgresql postgresql-server postgresql-devel postgresql-contrib

インストールが終わり、無事budle出来ました。

0
0
1

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