Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error while creating Rails APP #126

Open
Cosmicoppai opened this issue Feb 9, 2024 · 0 comments
Open

Getting error while creating Rails APP #126

Cosmicoppai opened this issue Feb 9, 2024 · 0 comments

Comments

@Cosmicoppai
Copy link

rails new notes
      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/cosmi/RubymineProjects/ruby-ki-khubi/rails_/notes/.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/assets/images
      create  app/assets/images/.keep
      create  app/controllers/concerns/.keep
      create  app/models/concerns/.keep
      create  bin
      create  bin/rails
      create  bin/rake
      create  bin/setup
      create  config
      create  config/routes.rb
      create  config/application.rb
      create  config/environment.rb
      create  config/cable.yml
      create  config/puma.rb
      create  config/storage.yml
      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_0.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  config/database.yml
      create  db
      create  db/seeds.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/422.html
      create  public/500.html
      create  public/apple-touch-icon-precomposed.png
      create  public/apple-touch-icon.png
      create  public/favicon.ico
      create  public/robots.txt
      create  tmp
      create  tmp/.keep
      create  tmp/pids
      create  tmp/pids/.keep
      create  tmp/cache
      create  tmp/cache/assets
      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
      create  storage
      create  storage/.keep
      create  tmp/storage
      create  tmp/storage/.keep
      remove  config/initializers/cors.rb
      remove  config/initializers/new_framework_defaults_7_0.rb
         run  bundle install
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Installing psych 5.1.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
C:/RailsInstaller/Ruby3.1.2/lib/ruby/gems/3.1.0/gems/psych-5.1.2/ext/psych
C:/RailsInstaller/Ruby3.1.2/bin/ruby.exe extconf.rb
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
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/RailsInstaller/Ruby3.1.2/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
        --without-yaml-0.1-include=${yaml-0.1-dir}/include
        --with-yaml-0.1-lib
        --without-yaml-0.1-lib=${yaml-0.1-dir}/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
        --without-libyaml-include=${libyaml-dir}/include
        --with-libyaml-lib
        --without-libyaml-lib=${libyaml-dir}/lib

To see why this extension failed to compile, please check the mkmf.log which can
be found here:

C:/RailsInstaller/Ruby3.1.2/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/psych-5.1.2/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in
C:/RailsInstaller/Ruby3.1.2/lib/ruby/gems/3.1.0/gems/psych-5.1.2 for inspection.
Results logged to
C:/RailsInstaller/Ruby3.1.2/lib/ruby/gems/3.1.0/extensions/x64-mingw-ucrt/3.1.0/psych-5.1.2/gem_make.out

C:/RailsInstaller/Ruby3.1.2/lib/ruby/site_ruby/3.1.0/rubygems/ext/builder.rb:125:in
`run'
C:/RailsInstaller/Ruby3.1.2/lib/ruby/site_ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:28:in
`build'
C:/RailsInstaller/Ruby3.1.2/lib/ruby/site_ruby/3.1.0/rubygems/ext/builder.rb:193:in
`build_extension'
C:/RailsInstaller/Ruby3.1.2/lib/ruby/site_ruby/3.1.0/rubygems/ext/builder.rb:227:in
`block in build_extensions'
C:/RailsInstaller/Ruby3.1.2/lib/ruby/site_ruby/3.1.0/rubygems/ext/builder.rb:224:in
`each'
C:/RailsInstaller/Ruby3.1.2/lib/ruby/site_ruby/3.1.0/rubygems/ext/builder.rb:224:in
`build_extensions'
C:/RailsInstaller/Ruby3.1.2/lib/ruby/site_ruby/3.1.0/rubygems/installer.rb:852:in
`build_extensions'
C:/RailsInstaller/Ruby3.1.2/lib/ruby/site_ruby/3.1.0/bundler/rubygems_gem_installer.rb:76:in
`build_extensions'
C:/RailsInstaller/Ruby3.1.2/lib/ruby/site_ruby/3.1.0/bundler/rubygems_gem_installer.rb:28:in
`install'
C:/RailsInstaller/Ruby3.1.2/lib/ruby/site_ruby/3.1.0/bundler/source/rubygems.rb:205:in
`install'
C:/RailsInstaller/Ruby3.1.2/lib/ruby/site_ruby/3.1.0/bundler/installer/gem_installer.rb:54:in
`install'
C:/RailsInstaller/Ruby3.1.2/lib/ruby/site_ruby/3.1.0/bundler/installer/gem_installer.rb:16:in
`install_from_spec'
C:/RailsInstaller/Ruby3.1.2/lib/ruby/site_ruby/3.1.0/bundler/installer/parallel_installer.rb:132:in
`do_install'
C:/RailsInstaller/Ruby3.1.2/lib/ruby/site_ruby/3.1.0/bundler/installer/parallel_installer.rb:123:in
`block in worker_pool'
C:/RailsInstaller/Ruby3.1.2/lib/ruby/site_ruby/3.1.0/bundler/worker.rb:62:in
`apply_func'
C:/RailsInstaller/Ruby3.1.2/lib/ruby/site_ruby/3.1.0/bundler/worker.rb:57:in
`block in process_queue'
C:/RailsInstaller/Ruby3.1.2/lib/ruby/site_ruby/3.1.0/bundler/worker.rb:54:in
`loop'
C:/RailsInstaller/Ruby3.1.2/lib/ruby/site_ruby/3.1.0/bundler/worker.rb:54:in
`process_queue'
C:/RailsInstaller/Ruby3.1.2/lib/ruby/site_ruby/3.1.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.1, which depends on
    irb was resolved to 1.11.2, which depends on
      rdoc was resolved to 6.6.2, which depends on
        psych
         run  bundle binstubs bundler
Resolving dependencies...
       rails  importmap:install
Add Importmap include tags in application layout
      insert  app/views/layouts/application.html.erb
Create application.js module as entrypoint
      create  app/javascript/application.js
Use vendor/javascript for downloaded pins
      create  vendor/javascript
      create  vendor/javascript/.keep
Ensure JavaScript files are in the Sprocket manifest
      append  app/assets/config/manifest.js
Configure importmap paths in config/importmap.rb
      create  config/importmap.rb
Copying binstub
      create  bin/importmap
       rails  turbo:install stimulus:install
Import Turbo
      append  app/javascript/application.js
Pin Turbo
      append  config/importmap.rb
Create controllers directory
      create  app/javascript/controllers
      create  app/javascript/controllers/index.js
      create  app/javascript/controllers/application.js
      create  app/javascript/controllers/hello_controller.js
Import Stimulus controllers
      append  app/javascript/application.js
Pin Stimulus
Appending: pin "@hotwired/stimulus", to: "stimulus.min.js"
      append  config/importmap.rb
Appending: pin "@hotwired/stimulus-loading", to: "stimulus-loading.js"
      append  config/importmap.rb
Pin all controllers
Appending: pin_all_from "app/javascript/controllers", under: "controllers"
      append  config/importmap.rb
Run turbo:install:redis to switch on Redis and use it in development for turbo streams
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant