[Ralis5.2]Cloud9(AWSじゃない)でRuby2.6, Rails5.2を動かす

$ ruby -v 
ruby 2.3.4p301 (2017-03-30 revision 58214) [x86_64-linux]
$ rvm install 2.6.0 
$ rvm --default use 2.6.0

Gemfile

gem 'rails', '5.2.2'
$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "actionpack":
  In snapshot (Gemfile.lock):
    actionpack (= 4.2.5)

  In Gemfile:
    rails (= 5.2.2) was resolved to 5.2.2, which depends on
      actionpack (= 5.2.2)

    sass-rails (~> 5.0) was resolved to 5.0.6, which depends on
      railties (>= 4.0.0, < 6) was resolved to 4.2.5, which depends on
        actionpack (= 4.2.5)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
$ bundle update
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "railties":
  In Gemfile:
    coffee-rails (~> 4.1.0) was resolved to 4.1.0, which depends on
      railties (>= 4.0.0, < 5.0)

    jquery-rails was resolved to 4.3.3, which depends on
      railties (>= 4.2.0)

    rails (= 5.2.2) was resolved to 5.2.2, which depends on
      railties (= 5.2.2)

    sass-rails (~> 5.0) was resolved to 5.0.7, which depends on
      railties (>= 4.0.0, < 6)

    web-console (~> 2.0) was resolved to 2.3.0, which depends on
      railties (>= 4.0)

coffee-rails, jquery-rails, sass-rails, web-consoleはコメントアウト

$ bundle update
...
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.

Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.

For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
$ rails -v
Rails 5.2.2

ここまででRails5.2が動くようにはなった

コメントアウトした4つのgemを、こちらを参考にコメントアウトを外す。さらにtest, developmentに書かれているgemをコピペ。

$ bundle install
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 12.3.2
...(省略)...
Using web-console 3.7.0
Bundle complete! 18 Gemfile dependencies, 80 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

Comments

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です