2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

railsでrootのURLを変更する

Last updated at Posted at 2018-01-24

railsってそのまま

$ bundle exec rails s -p 3000

で起動すると http://localhost:3000 で初期画面があらわれますよね。
今回はその初期画面が出るURLを変更してみたいと思います.

#準備
まずrailsのルートディレクトリにあるGemfileに以下の一文を追加

gem 'unicorn'

Gemfile に記載されているgem を全てインストールします。

$ bundle install --path vendor/bundle

#実行
今回は http://localhost:3000/hoge で初期画面を出して見ます

$ bundle exec unicorn_rails -p 3000 --path /hoge

これだけ.

2
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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?