https://qiita.com/takeru56/items/ab09e239dc38e4da5ea1
このサイトを中心にラズパイ4にrails環境を設定していました。
しかし、railsをインストールしてバージョン確認してみると、エラー?なのかよくわからい物が出ます。(一応バージョンは表示される)
ruby 2.4
rails 5.2
railsversion
1pi@raspberrypi:~$ rails -v 2NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. 3Gem::Specification#rubyforge_project= called from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/specifications/i18n-0.9.5.gemspec:17. 4NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. 5Gem::Specification#rubyforge_project= called from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/specifications/rack-test-0.6.3.gemspec:17. 6Rails 5.2.0
これを無視してやるとrails newができません。
railsnew
1pi@raspberrypi:~$ rails new app 2NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. 3Gem::Specification#rubyforge_project= called from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/specifications/i18n-0.9.5.gemspec:17. 4NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. 5Gem::Specification#rubyforge_project= called from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/specifications/rack-test-0.6.3.gemspec:17. 6 exist 7/home/pi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/fileutils.rb:120:in `chdir': Not a directory @ dir_chdir - /home/pi/app (Errno::ENOTDIR) 8 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/2.4.0/fileutils.rb:120:in `cd' 9 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/generators/app_base.rb:166:in `create_root' 10 from (eval):1:in `create_root' 11 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run' 12 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command' 13 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thor-1.0.1/lib/thor/invocation.rb:134:in `block in invoke_all' 14 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thor-1.0.1/lib/thor/invocation.rb:134:in `each' 15 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thor-1.0.1/lib/thor/invocation.rb:134:in `map' 16 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thor-1.0.1/lib/thor/invocation.rb:134:in `invoke_all' 17 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thor-1.0.1/lib/thor/group.rb:232:in `dispatch' 18 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thor-1.0.1/lib/thor/base.rb:485:in `start' 19 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/commands/application/application_command.rb:26:in `perform' 20 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run' 21 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command' 22 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch' 23 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/command/base.rb:65:in `perform' 24 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/command.rb:46:in `invoke' 25 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/cli.rb:18:in `<top (required)>' 26 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:72:in `require' 27 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:72:in `require' 28 from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/railties-5.2.0/exe/rails:10:in `<top (required)>' 29 from /home/pi/.rbenv/versions/2.4.0/bin/rails:23:in `load' 30 from /home/pi/.rbenv/versions/2.4.0/bin/rails:23:in `<main>'
なにか原因がわかる方は回答、コメントよろしくおねがいします。
ちなみにrubyバージョンが切り替わらなかったhttps://qiita.com/opiyo_taku/items/3312a75d5916f6cd32b1
のサイトを参考にrubyのバージョンを切り替えています。
railsinstall
1pi@raspberrypi:~$ gem install rails -v 5.2 2NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. 3Gem::Specification#rubyforge_project= called from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/specifications/erubis-2.7.0.gemspec:17. 4NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. 5Gem::Specification#rubyforge_project= called from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/specifications/i18n-0.9.5.gemspec:17. 6NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. 7Gem::Specification#rubyforge_project= called from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/specifications/rack-test-0.6.3.gemspec:17. 8NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. 9Gem::Specification#rubyforge_project= called from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/specifications/sprockets-3.7.2.gemspec:19. 10NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. 11Gem::Specification#rubyforge_project= called from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/specifications/rack-test-0.6.3.gemspec:17. 12NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. 13Gem::Specification#rubyforge_project= called from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/specifications/i18n-0.9.5.gemspec:17. 14NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. 15Gem::Specification#rubyforge_project= called from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/specifications/sprockets-3.7.2.gemspec:19. 16NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. 17Gem::Specification#rubyforge_project= called from /home/pi/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/specifications/erubis-2.7.0.gemspec:17. 18Successfully installed rails-5.2.0 19Parsing documentation for rails-5.2.0 20Done installing documentation for rails after 0 seconds 211 gem installed 22pi@raspberrypi:~$
あなたの回答
tips
プレビュー