RVM /レールを再インストールした後、レール・サーバを起動することはできません -私は最近、RVMをアンインストールしてから、RVMを再インストールし、レールを再インストールする必要がありました
私がレールのを起動することはできませんので、レールが正しくインストールされなかったことが表示されます。私はruby 2.3.0で作業していて、sudo gem install railを実行して最新のバージョンのレールを入手しました。
インストールすると、インストールおよびバンドルのアップデートバンドルを実行した後、私は
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tmpdir.rb:85:in `mkdir': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError)
Permission denied - ./.gem.20160330-64997-1erpjjg
Gem files will remain installed in /Users/chloe/.rvm/gems/[email protected]/gems/nokogiri-1.6.7.2 for inspection.
Results logged to /Users/chloe/.rvm/gems/[email protected]/extensions/universal-darwin-14/2.0.0/nokogiri-1.6.7.2/gem_make.out
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tmpdir.rb:85:in `block in mktmpdir'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tmpdir.rb:142:in `create'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/tmpdir.rb:85:in `mktmpdir'
from /Library/Ruby/Site/2.0.0/rubygems/ext/ext_conf_builder.rb:14:in `build'
from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:161:in `block (2 levels) in build_extension'
from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:160:in `chdir'
from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:160:in `block in build_extension'
from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:159:in `synchronize'
from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:159:in `build_extension'
from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:198:in `block in build_extensions'
from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:195:in `each'
from /Library/Ruby/Site/2.0.0/rubygems/ext/builder.rb:195:in `build_extensions'
from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:1436:in `block in build_extensions'
from /Library/Ruby/Site/2.0.0/rubygems/user_interaction.rb:45:in `use_ui'
from /Library/Ruby/Site/2.0.0/rubygems/specification.rb:1434:in `build_extensions'
from /Library/Ruby/Site/2.0.0/rubygems/stub_specification.rb:60:in `build_extensions'
from /Library/Ruby/Site/2.0.0/rubygems/basic_specification.rb:56:in `contains_requirable_file?'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:68:in `block in require'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:67:in `each'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:67:in `find'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:67:in `require'
from /Users/chloe/.rvm/gems/[email protected]/gems/railties-4.2.6/bin/rails:9:in `<top (required)>'
from /usr/bin/rails:22:in `load'
from /usr/bin/rails:22:in `<main>'
私はthis質問からソリューションを使用してみました。このエラーを得たが、「apt-getのコマンドが見つからない」だ---私が謝罪しますこれに似た解決策が必要な場合は! **
=> Booting WEBrick
=> Rails 4.1.4 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
Exiting
/Users/chloe/sites/bookshelf/config/environment.rb:7:in `<top (required)>': undefined local variable or method `config' for main:Object (NameError)
from /Users/chloe/sites/bookshelf/config.ru:3:in `require'
from /Users/chloe/sites/bookshelf/config.ru:3:in `block in <main>'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize'
from /Users/chloe/sites/bookshelf/config.ru:in `new'
from /Users/chloe/sites/bookshelf/config.ru:in `<main>'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:49:in `eval'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:49:in `new_from_string'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/rack-1.5.5/lib/rack/builder.rb:40:in `parse_file'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/rack-1.5.5/lib/rack/server.rb:277:in `build_app_and_options_from_config'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/rack-1.5.5/lib/rack/server.rb:199:in `app'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/railties-4.1.4/lib/rails/commands/server.rb:50:in `app'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/rack-1.5.5/lib/rack/server.rb:314:in `wrapped_app'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/railties-4.1.4/lib/rails/commands/server.rb:130:in `log_to_stdout'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/railties-4.1.4/lib/rails/commands/server.rb:67:in `start'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:81:in `block in server'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:76:in `tap'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:76:in `server'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/railties-4.1.4/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/railties-4.1.4/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/chloe/sites/bookshelf/bin/rails:9:in `require'
from /Users/chloe/sites/bookshelf/bin/rails:9:in `<top (required)>'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `load'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/spring-1.6.4/lib/spring/client/rails.rb:28:in `call'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/spring-1.6.4/lib/spring/client/command.rb:7:in `call'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/spring-1.6.4/lib/spring/client.rb:28:in `run'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/spring-1.6.4/bin/spring:49:in `<top (required)>'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `load'
from /Users/chloe/.rvm/gems/ruby-2.3.0/gems/spring-1.6.4/lib/spring/binstub.rb:11:in `<top (required)>'
from /Users/chloe/sites/bookshelf/bin/spring:13:in `require'
from /Users/chloe/sites/bookshelf/bin/spring:13:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
[1]: https://stackoverflow.com/questions/7645918/require-no-such-file-to-load-mkmf-loaderror
:
私は宝石のアップデート---システムで宝石を更新した後マックOSX
EDIT ****
を使用しています、私は新しいエラーメッセージを持っています** this質問からSOLUTION ****
ソリューションはそれを修正するために登場:
enviroment.rbファイルにを追加し、configで始まる行をすべて削除し、代わりにproduction.rb/development.rb/test.rbに貼り付けてください。カット、あなたのenviroment.rbファイルに
- 第二の問題については
gem update --system
最初issue--
実行で
:
ご使用の環境でRuby 2.0.0を使用しているようです。 'ruby -v'を実行するとどうなりますか? –
Ruby 2.3.0p0(2015-12-25リビジョン53290)[x86_64-darwin14] ruby -vを実行すると、両方ともrvmが正しく動作しない可能性がありますか? – user146303
今のところ、 'apt-get'はDebian Linux特有のコマンドです。 HomebrewはMacでも同等です。 –