Hello, I am currently working on a local web app. I want to use Ruby on Rails as the back-end with a MongoDB database, and HTML/CSS Bootstrap/JavaScript for the front-end. I have an issue when I run the command line "bundle install" to install the dependencies. I'll share the code here, hoping someone can help me install Rails and create my first ToDo application:
rails new todo_app --skip-active-record
C:\Users\djena>rails new todo_app --skip-active-record
Based on the specified options, the following options will also be activated:
--skip-active-storage [due to --skip-active-record]
--skip-action-mailbox [due to --skip-active-storage]
--skip-action-text [due to --skip-active-storage]
create
create README.md
create Rakefile
create .ruby-version
create
config.ru create .gitignore
create .gitattributes
create Gemfile
run git init from "."
Initialized empty Git repository in C:/Users/djena/todo_app/.git/
create app
create app/assets/config/manifest.js
create app/assets/stylesheets/application.css
create app/channels/application_cable/channel.rb
create app/channels/application_cable/connection.rb
create app/controllers/application_controller.rb
create app/helpers/application_helper.rb
create app/jobs/application_job.rb
create app/mailers/application_mailer.rb
create app/models/application_record.rb
create app/views/layouts/application.html.erb
create app/views/layouts/mailer.html.erb
create app/views/layouts/mailer.text.erb
create app/views/pwa/manifest.json.erb
create app/views/pwa/service-worker.js
create app/assets/images
create app/assets/images/.keep
create app/controllers/concerns/.keep
create app/models/concerns/.keep
create bin
create bin/brakeman
create bin/rails
create bin/rake
create bin/rubocop
create bin/setup
create Dockerfile
create .dockerignore
create bin/docker-entrypoint
create .rubocop.yml
create .github/workflows
create .github/workflows/ci.yml
create .github/dependabot.yml
create config
create config/routes.rb
create config/application.rb
create config/environment.rb
create config/cable.yml
create config/puma.rb
create config/environments
create config/environments/development.rb
create config/environments/production.rb
create config/environments/test.rb
create config/initializers
create config/initializers/assets.rb
create config/initializers/content_security_policy.rb
create config/initializers/cors.rb
create config/initializers/filter_parameter_logging.rb
create config/initializers/inflections.rb
create config/initializers/new_framework_defaults_7_2.rb
create config/initializers/permissions_policy.rb
create config/locales
create config/locales/en.yml
create config/master.key
append .gitignore
create config/boot.rb
create lib
create lib/tasks
create lib/tasks/.keep
create lib/assets
create lib/assets/.keep
create log
create log/.keep
create public
create public/404.html
create public/406-unsupported-browser.html
create public/422.html
create public/500.html
create public/icon.png
create public/icon.svg
create public/robots.txt
create tmp
create tmp/.keep
create tmp/pids
create tmp/pids/.keep
create vendor
create vendor/.keep
create test/fixtures/files
create test/fixtures/files/.keep
create test/controllers
create test/controllers/.keep
create test/mailers
create test/mailers/.keep
create test/models
create test/models/.keep
create test/helpers
create test/helpers/.keep
create test/integration
create test/integration/.keep
create test/channels/application_cable/connection_test.rb
create test/test_helper.rb
create test/system
create test/system/.keep
create test/application_system_test_case.rb
remove app/models/application_record.rb
remove config/initializers/cors.rb
remove config/initializers/new_framework_defaults_7_2.rb
run bundle install --quiet
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
C:/Users/djena/.local/share/gem/ruby/3.3.0/gems/psych-5.1.2/ext/psych
C:/Ruby33-x64/bin/ruby.exe extconf.rb
checking for pkg-config for yaml-0.1... not found
checking for yaml.h... no
yaml.h not found
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include=${opt-dir}/include
--without-opt-include
--with-opt-lib=${opt-dir}/lib
--without-opt-lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby33-x64/bin/$(RUBY_BASE_NAME)
--with-libyaml-source-dir
--without-libyaml-source-dir
--with-yaml-0.1-dir
--without-yaml-0.1-dir
--with-yaml-0.1-include=${yaml-0.1-dir}/include
--without-yaml-0.1-include
--with-yaml-0.1-lib=${yaml-0.1-dir}/lib
--without-yaml-0.1-lib
--with-yaml-0.1-config
--without-yaml-0.1-config
--with-pkg-config
--without-pkg-config
--with-libyaml-dir
--without-libyaml-dir
--with-libyaml-include=${libyaml-dir}/include
--without-libyaml-include
--with-libyaml-lib=${libyaml-dir}/lib
--without-libyaml-lib
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
C:/Users/djena/.local/share/gem/ruby/3.3.0/extensions/x64-mingw-ucrt/3.3.0/psych-5.1.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
C:/Users/djena/.local/share/gem/ruby/3.3.0/gems/psych-5.1.2 for inspection.
Results logged to
C:/Users/djena/.local/share/gem/ruby/3.3.0/extensions/x64-mingw-ucrt/3.3.0/psych-5.1.2/gem_make.out
C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:125:in `run'
C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/ext_conf_builder.rb:28:in `build'
C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:193:in `build_extension'
C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:227:in `block in
build_extensions'
C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:224:in `each'
C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:224:in `build_extensions'
C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/installer.rb:853:in `build_extensions'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/rubygems_gem_installer.rb:109:in
`build_extensions'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/rubygems_gem_installer.rb:28:in `install'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/source/rubygems.rb:205:in `install'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/installer/gem_installer.rb:54:in
`install'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/installer/parallel_installer.rb:132:in
`do_install'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/installer/parallel_installer.rb:123:in
`block in worker_pool'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/worker.rb:62:in `apply_func'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/worker.rb:57:in `block in process_queue'
<internal:kernel>:187:in `loop'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/worker.rb:54:in `process_queue'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/worker.rb:90:in `block (2 levels) in
create_threads'
An error occurred while installing psych (5.1.2), and Bundler cannot continue.
In Gemfile:
debug was resolved to 1.9.2, which depends on
irb was resolved to 1.14.1, which depends on
rdoc was resolved to 6.7.0, which depends on
psych run bundle lock --add-platform=x86_64-linux
Fetching gem metadata from
https://rubygems.org/..........
Resolving dependencies...
Writing lockfile to C:/Users/djena/todo_app/Gemfile.lock
run bundle binstubs bundler
Could not find importmap-rails-2.0.3, turbo-rails-2.0.11, stimulus-rails-1.3.4,
debug-1.9.2, web-console-4.2.1, irb-1.14.1, rdoc-6.7.0 in locally installed gems
rails importmap:install
Could not find importmap-rails-2.0.3, turbo-rails-2.0.11, stimulus-rails-1.3.4, debug-1.9.2, web-console-4.2.1, irb-1.14.1, rdoc-6.7.0 in locally installed gems
Run `bundle install` to install missing gems.
rails turbo:install stimulus:install
Could not find importmap-rails-2.0.3, turbo-rails-2.0.11, stimulus-rails-1.3.4, debug-1.9.2, web-console-4.2.1, irb-1.14.1, rdoc-6.7.0 in locally installed gems
Run `bundle install` to install missing gems.
C:\Users\djena\todo_app>bundle installFetching gem metadata from
https://rubygems.org/.........
Installing psych 5.1.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
C:/Users/djena/.local/share/gem/ruby/3.3.0/gems/psych-5.1.2/ext/psych
C:/Ruby33-x64/bin/ruby.exe extconf.rb
checking for pkg-config for yaml-0.1... not found
checking for yaml.h... no
yaml.h not found
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include=${opt-dir}/include
--without-opt-include
--with-opt-lib=${opt-dir}/lib
--without-opt-lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby33-x64/bin/$(RUBY_BASE_NAME)
--with-libyaml-source-dir
--without-libyaml-source-dir
--with-yaml-0.1-dir
--without-yaml-0.1-dir
--with-yaml-0.1-include=${yaml-0.1-dir}/include
--without-yaml-0.1-include
--with-yaml-0.1-lib=${yaml-0.1-dir}/lib
--without-yaml-0.1-lib
--with-yaml-0.1-config
--without-yaml-0.1-config
--with-pkg-config
--without-pkg-config
--with-libyaml-dir
--without-libyaml-dir
--with-libyaml-include=${libyaml-dir}/include
--without-libyaml-include
--with-libyaml-lib=${libyaml-dir}/lib
--without-libyaml-lib
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
C:/Users/djena/.local/share/gem/ruby/3.3.0/extensions/x64-mingw-ucrt/3.3.0/psych-5.1.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
C:/Users/djena/.local/share/gem/ruby/3.3.0/gems/psych-5.1.2 for inspection.
Results logged to
C:/Users/djena/.local/share/gem/ruby/3.3.0/extensions/x64-mingw-ucrt/3.3.0/psych-5.1.2/gem_make.out
C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:125:in `run'
C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/ext_conf_builder.rb:28:in `build'
C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:193:in `build_extension'
C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:227:in `block in
build_extensions'
C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:224:in `each'
C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/ext/builder.rb:224:in `build_extensions'
C:/Ruby33-x64/lib/ruby/3.3.0/rubygems/installer.rb:853:in `build_extensions'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/rubygems_gem_installer.rb:109:in
`build_extensions'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/rubygems_gem_installer.rb:28:in `install'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/source/rubygems.rb:205:in `install'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/installer/gem_installer.rb:54:in
`install'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/installer/parallel_installer.rb:132:in
`do_install'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/installer/parallel_installer.rb:123:in
`block in worker_pool'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/worker.rb:62:in `apply_func'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/worker.rb:57:in `block in process_queue'
<internal:kernel>:187:in `loop'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/worker.rb:54:in `process_queue'
C:/Ruby33-x64/lib/ruby/3.3.0/bundler/worker.rb:90:in `block (2 levels) in
create_threads'
An error occurred while installing psych (5.1.2), and Bundler cannot continue.
In Gemfile:
debug was resolved to 1.9.2, which depends on
irb was resolved to 1.14.1, which depends on
rdoc was resolved to 6.7.0, which depends on
psychC:\Users\djena\todo_app>