gem 'rails'
をかいて bundle install
したんですが rails
コマンドが見つかりません
rbenv, ruby をインストールした後
Gemfile に
source 'https://rubygems.org'
gem 'rails'
とかいて
bundle install
を実行し、依存関係のあるジェムがいろいろインストールされた後
Bundle complete! 1 Gemfile dependency, 43 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
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 コマンドを実行しようとしてもコマンドが見つかりません
rbenv は $HOME/.rbenv にインストール
.bashrc に
# rbenv
export RBENV_ROOT="$HOME/.rbenv"
if [ -d "${RBENV_ROOT}" ]; then
export PATH="$PATH:$RBENV_ROOT/bin"
if which rbenv > /dev/null; then
eval "$(rbenv init -)";
fi
fi
をかいて source 済み
which ruby, gem, bundle は全部 $HOME/.rbenv/shims/ 以下になってます
rails コマンドはどこにインストールされたんでしょうか
OS は
5.0.0-37-generic #40-Ubuntu SMP Thu Nov 14 00:14:01 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
ruby は 2.6.5 です
追記
なぜか ubuntu 上で gem install rails だけでは rails がインストールできません
ubuntu> gem install rails
Fetching rails-6.0.2.1.gem
Successfully installed rails-6.0.2.1
Parsing documentation for rails-6.0.2.1
Installing ri documentation for rails-6.0.2.1
Done installing documentation for rails after 1 seconds
1 gem installed
ubuntu> rails -v
Command 'rails' not found, but can be installed with:
sudo apt install ruby-railties