我刚刚使用railsinstaller在ruby上安装了ruby,并且在Ruby和Rails的命令提示符中运行“ rails new myrubyblog”时,发生了此错误。我不确定这是什么,我尝试卸载rails上的ruby并使用railsinstaller再次安装它,但这似乎无济于事。我已经在这里停留了很长时间,但仍然找不到解决方法。有人可以给我一些提示吗?谢谢!
# Rails Environment Configuration.
C:/RailsInstaller/scripts/config_check.rb:28:in ``': No such file or directory - C:/RailsInstaller/Git/bin/git.exe config --global user.name (Errno::ENOENT)
from C:/RailsInstaller/scripts/config_check.rb:28:in `run'
from C:/RailsInstaller/scripts/config_check.rb:40:in `git_config'
from C:/RailsInstaller/scripts/config_check.rb:49:in `block in <main>'
from C:/RailsInstaller/scripts/config_check.rb:48:in `each'
from C:/RailsInstaller/scripts/config_check.rb:48:in `<main>'
C:\Sites>rails new myrubyblog
exist
identical README.md
identical Rakefile
identical config.ru
identical .gitignore
identical Gemfile
run git init from "."
Reinitialized existing Git repository in C:/Sites/myrubyblog/.git/
exist app
identical app/assets/config/manifest.js
identical app/assets/javascripts/application.js
identical app/assets/javascripts/cable.js
identical app/assets/stylesheets/application.css
identical app/channels/application_cable/channel.rb
identical app/channels/application_cable/connection.rb
identical app/controllers/application_controller.rb
identical app/helpers/application_helper.rb
identical app/jobs/application_job.rb
identical app/mailers/application_mailer.rb
identical app/models/application_record.rb
identical app/views/layouts/application.html.erb
identical app/views/layouts/mailer.html.erb
identical app/views/layouts/mailer.text.erb
identical app/assets/images/.keep
exist app/assets/javascripts/channels
identical app/assets/javascripts/channels/.keep
identical app/controllers/concerns/.keep
identical app/models/concerns/.keep
exist bin
identical bin/bundle
identical bin/rails
identical bin/rake
identical bin/setup
identical bin/update
identical bin/yarn
exist config
identical config/routes.rb
identical config/application.rb
identical config/environment.rb
conflict config/secrets.yml
Overwrite C:/Sites/myrubyblog/config/secrets.yml? (enter "h" for help) [Ynaqdhm]
force config/secrets.yml
identical config/cable.yml
identical config/puma.rb
exist config/environments
identical config/environments/development.rb
identical config/environments/production.rb
identical config/environments/test.rb
exist config/initializers
identical config/initializers/application_controller_renderer.rb
identical config/initializers/assets.rb
identical config/initializers/backtrace_silencers.rb
identical config/initializers/cookies_serializer.rb
create config/initializers/cors.rb
identical config/initializers/filter_parameter_logging.rb
identical config/initializers/inflections.rb
identical config/initializers/mime_types.rb
create config/initializers/new_framework_defaults_5_1.rb
identical config/initializers/wrap_parameters.rb
exist config/locales
identical config/locales/en.yml
identical config/boot.rb
identical config/database.yml
exist db
identical db/seeds.rb
exist lib
exist lib/tasks
identical lib/tasks/.keep
exist lib/assets
identical lib/assets/.keep
exist log
identical log/.keep
exist public
identical public/404.html
identical public/422.html
identical public/500.html
identical public/apple-touch-icon-precomposed.png
identical public/apple-touch-icon.png
identical public/favicon.ico
identical public/robots.txt
exist test/fixtures
identical test/fixtures/.keep
exist test/fixtures/files
identical test/fixtures/files/.keep
exist test/controllers
identical test/controllers/.keep
exist test/mailers
identical test/mailers/.keep
exist test/models
identical test/models/.keep
exist test/helpers
identical test/helpers/.keep
exist test/integration
identical test/integration/.keep
identical test/test_helper.rb
exist test/system
identical test/system/.keep
identical test/application_system_test_case.rb
exist tmp
identical tmp/.keep
exist tmp/cache
exist tmp/cache/assets
exist vendor
identical vendor/.keep
identical package.json
remove config/initializers/cors.rb
remove config/initializers/new_framework_defaults_5_1.rb
run bundle install
[DEPRECATED] `Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env` (called at C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/railties-5.1.7/lib/rails/generators/app_base.rb:385)
更新: 删除ruby和rails之后,我重新安装了ruby 2.6.5。然后,我尝试按照教程https://www.tutorialspoint.com/ruby-on-rails/rails-installation.htm(I的说明在命令提示符下键入“ gem install rails”来安装Rails,在我的计算机中也有sqlite3。但是我又遇到了另一个这样的错误:
C:\>gem install rails
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
current directory: D:/ruby files/Ruby26-x64/lib/ruby/gems/2.6.0/gems/websocket-driver-0.7.1/ext/websocket-driver
D:/ruby\ files/Ruby26-x64/bin/ruby.exe -I D:/ruby\ files/Ruby26-x64/lib/ruby/2.6.0 -r ./siteconf20191228-14032-rudo55.rb extconf.rb
creating Makefile
current directory: D:/ruby files/Ruby26-x64/lib/ruby/gems/2.6.0/gems/websocket-driver-0.7.1/ext/websocket-driver
make "DESTDIR=" clean
Makefile:269: *** multiple target patterns. Stop.
current directory: D:/ruby files/Ruby26-x64/lib/ruby/gems/2.6.0/gems/websocket-driver-0.7.1/ext/websocket-driver
make "DESTDIR="
Makefile:269: *** multiple target patterns. Stop.
make failed, exit code 2
Gem files will remain installed in D:/ruby files/Ruby26-x64/lib/ruby/gems/2.6.0/gems/websocket-driver-0.7.1 for inspection.
Results logged to D:/ruby files/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/websocket-driver-0.7.1/gem_make.out