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

Error occurs everytime i try to create a new rails app #4197

Closed
Irakaj93 opened this issue Dec 25, 2020 · 8 comments
Closed

Error occurs everytime i try to create a new rails app #4197

Irakaj93 opened this issue Dec 25, 2020 · 8 comments

Comments

@Irakaj93
Copy link

Irakaj93 commented Dec 25, 2020

`-

Error Report

Questions

Please fill out answers to these questions, it'll help us figure out
why things are going wrong.

  • What did you do?

    I ran the command /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.3/exe/bundle install

  • What did you expect to happen?

    I expected Bundler to finish installing the necessary gems for my rails app. But it stopped at "rails" plus there is no Gemfile.lock

  • What happened instead?

    Instead, what happened was:
    "Could not find gem 'rails (~> 6.1.0)' in any of the gem sources listed in your
    Gemfile."

  • Have you tried any solutions posted on similar issues in our issue tracker, stack overflow, or google?

    I have not

  • Have you read our issues document, https://github.com/rubygems/rubygems/blob/master/bundler/doc/contributing/ISSUES.md?

    ...

Backtrace

Errno::EPERM: Operation not permitted @ apply2files - /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rails-6.1.0/README.md
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/fileutils.rb:1346:in `chmod'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/fileutils.rb:1346:in `chmod'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/fileutils.rb:1017:in `block in chmod'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/fileutils.rb:1016:in `each'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/fileutils.rb:1016:in `chmod'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/package.rb:442:in `block (3 levels) in extract_tar_gz'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/package.rb:440:in `open'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/package.rb:440:in `block (2 levels) in extract_tar_gz'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/package/tar_reader.rb:67:in `each'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/package.rb:421:in `block in extract_tar_gz'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/package.rb:550:in `block in open_tar_gz'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/package.rb:547:in `wrap'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/package.rb:547:in `open_tar_gz'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/package.rb:420:in `extract_tar_gz'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/package.rb:400:in `block (2 levels) in extract_files'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/package/tar_reader.rb:67:in `each'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/package.rb:397:in `block in extract_files'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/package/file_source.rb:30:in `open'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/package/file_source.rb:30:in `with_read_io'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/package.rb:394:in `extract_files'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/installer.rb:865:in `extract_files'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/2.7.0/rubygems/installer.rb:325:in `install'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.3/lib/bundler/source/rubygems.rb:158:in `install'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.3/lib/bundler/installer/gem_installer.rb:67:in `install'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.3/lib/bundler/installer/gem_installer.rb:18:in `install_from_spec'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.3/lib/bundler/installer/parallel_installer.rb:163:in `do_install'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.3/lib/bundler/installer/parallel_installer.rb:154:in `block in worker_pool'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.3/lib/bundler/worker.rb:62:in `apply_func'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.3/lib/bundler/worker.rb:57:in `block in process_queue'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.3/lib/bundler/worker.rb:54:in `loop'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.3/lib/bundler/worker.rb:54:in `process_queue'
  /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.2.3/lib/bundler/worker.rb:88:in `block (2 levels) in create_threads'

Environment

Bundler       2.2.3
  Platforms   ruby, x86_64-darwin-20
Ruby          2.7.2p137 (2020-10-01 revision 5445e0435260b449decf2ac16f9d09bae3cafe72) [x86_64-darwin20]
  Full Path   /Users/jakari/.rbenv/versions/2.7.2/bin/ruby
  Config Dir  /Users/jakari/.rbenv/versions/2.7.2/etc
RubyGems      3.1.4
  Gem Home    /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0
  Gem Path    /Users/jakari/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0:/Users/jakari/.gem/ruby/2.7.0
  User Home   /Users/jakari
  User Path   /Users/jakari/.gem/ruby/2.7.0
  Bin Dir     /Users/jakari/.rbenv/versions/2.7.2/bin
OpenSSL       
  Compiled    OpenSSL 1.1.1i  8 Dec 2020
  Loaded      OpenSSL 1.1.1i  8 Dec 2020
  Cert File   /Users/jakari/.rbenv/versions/2.7.2/openssl/ssl/cert.pem
  Cert Dir    /Users/jakari/.rbenv/versions/2.7.2/openssl/ssl/certs
Tools         
  Git         2.29.2
  RVM         not installed
  rbenv       rbenv 1.1.2
  chruby      not installed

Bundler Build Metadata

Built At          2020-12-22
Git SHA           29dc3c8398
Released Version  true

Bundler settings

ignore_messages
  Set via BUNDLE_IGNORE_MESSAGES: true

Gemfile

Gemfile

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.7.2'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.1.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.4'
# Use Puma as the app server
gem 'puma', '~> 5.0'
# Use SCSS for stylesheets
gem 'sass-rails', '>= 6'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 5.0'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Active Storage variant
# gem 'image_processing', '~> 1.2'

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.4', require: false

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end

group :development do
  # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
  gem 'web-console', '>= 4.1.0'
  # Display performance information such as SQL time and flame graphs for each request in your browser.
  # Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md
  gem 'rack-mini-profiler', '~> 2.0'
  gem 'listen', '~> 3.3'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
end

group :test do
  # Adds support for Capybara system testing and selenium driver
  gem 'capybara', '>= 3.26'
  gem 'selenium-webdriver'
  # Easy installation and use of web drivers to run system tests with browsers
  gem 'webdrivers'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

Gemfile.lock

<No /Users/jakari/friends/Gemfile.lock found>`
@deivid-rodriguez
Copy link
Member

Oh wow, this is unexpected. Can you upgrade rubygems with gem update --system and try again?

@Irakaj93
Copy link
Author

``jakari@Jakaris-MacBook-Pro ~ % gem update --system
Updating rubygems-update
Fetching rubygems-update-3.2.3.gem
Successfully installed rubygems-update-3.2.3
Parsing documentation for rubygems-update-3.2.3
Installing ri documentation for rubygems-update-3.2.3
Installing darkfish documentation for rubygems-update-3.2.3
Done installing documentation for rubygems-update after 48 seconds
Parsing documentation for rubygems-update-3.2.3
Done installing documentation for rubygems-update after 0 seconds
Installing RubyGems 3.2.3
Successfully built RubyGem
Name: bundler
Version: 2.2.3
File: bundler-2.2.3.gem
Bundler 2.2.3 installed
RubyGems 3.2.3 installed
Regenerating binstubs
Regenerating plugins
Parsing documentation for rubygems-3.2.3
Installing ri documentation for rubygems-3.2.3

=== 3.2.3 / 2020-12-22

Enhancements:

Bug fixes:

=== 3.2.2 / 2020-12-17

Bug fixes:

=== 3.2.1 / 2020-12-14

Enhancements:

Bug fixes:

=== 3.2.0 / 2020-12-07

Enhancements:

Bug fixes:

Deprecations:

Performance:

=== 3.2.0.rc.2 / 2020-10-08

Enhancements:

Bug fixes:

Performance:

=== 3.2.0.rc.1 / 2020-07-04

Enhancements:

Bug fixes:

Deprecations:

Breaking changes:


RubyGems installed the following executables:
/Users/jakari/.rbenv/versions/2.7.2/bin/gem
/Users/jakari/.rbenv/versions/2.7.2/bin/bundle

Ruby Interactive (ri) documentation was installed. ri is kind of like man
pages for Ruby libraries. You may access it like this:
ri Classname
ri Classname.class_method
ri Classname#instance_method
If you do not wish to install this documentation in the future, use the
--no-document flag, or set it as the default in your ~/.gemrc file. See
'gem help env' for details.

So this is what I got when I entered "gem update --system"

Then when I tried "bundle install"
it just said gemfile not found.

RubyGems system software updated jakari@Jakaris-MacBook-Pro ~ % bundle install Could not locate Gemfile jakari@Jakaris-MacBook-Pro ~ %

@deivid-rodriguez
Copy link
Member

You need to run bundle install from the same folder as before. Are you doing that?

@Irakaj93
Copy link
Author

I think it worked!!!!

Bundle complete! 17 Gemfile dependencies, 74 gems now installed. Bundled gems are installed into ./path`
Post-install message from i18n:

HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.

If you are upgrading your Rails application from an older version of Rails:

Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.

If you are starting a NEW Rails application, you can ignore this notice.

For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0

jakari@Jakaris-MacBook-Pro friends % `

@Irakaj93
Copy link
Author

Irakaj93 commented Dec 26, 2020

jakari@Jakaris-MacBook-Pro friends % bin/ rails server
zsh: permission denied: bin/ jakari@Jakaris-MacBook-Pro friends % `
This seems to be my only problem now.....

@Irakaj93
Copy link
Author

I think I messed up by putting a space between the bin/ and rails.
But when I put in
bin/rails server
I got this at the end:
/Users/jakari/friends/PATH/ruby/2.7.0/gems/webpacker-5.2.1/lib/webpacker/configuration.rb:99:in rescue in load': Webpacker configuration file not found /Users/jakari/friends/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ rb_sysopen - /Users/jakari/friends/config/webpacker.yml (RuntimeError)`

@deivid-rodriguez
Copy link
Member

Yeah! It seems to be working. Regarding the webpacker error, try to regenerate the app from scratch, maybe the first time some stuff couldn't run because of the error.

But it doesn't seem like a problem in rubygems.

Also, when you copy-paste commands in here, could you wrap them in backquotes so that they are rendered nicely and they are easy to read? Here's a markdown guide: https://guides.github.com/features/mastering-markdown/.

@deivid-rodriguez
Copy link
Member

Closing due to lack of feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants