cloud9でrailsサーバを立ち上げる、の巻
$ rails s -b 0.0.0.0
cloud9ではipを0.0.0.0に指定する
Specified 'sqlite3' for database adapter, but the gem is not loaded. Add
gem 'sqlite3'
to your Gemfile (and ensure its version is at the minimum req
sqlite3のバージョンを指定する必要がある。
rails newで作成したディレクトリ内にあるGemfileを編集する
$ vim Gemfile >> source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.0.0' # Use sqlite3 as the database for Active Record gem 'sqlite3', '~>1.3.6'
もう一度サーバを起動させてみる。
$ rails s -b 0.0.0.0 >> Could not find gem 'sqlite3 (~> 1.3.6)' in any of the gem sources listed in your Gemfile. Run `bundle install` to install missing gems.
bundle install
するように言われているのでやってみる。
$ bundle install >> Bundle complete! 15 Gemfile dependencies, 62 gems now installed. Use `bundle info [gemname]` to see where a bundled gem is installed.
一応updateもしておく。
$ bundle update
>>
Bundle updated!
再度サーバを起動。
$ rails s -b 0.0.0.0
成功