0

I have a student receiving an error when running 'bundle install'. Things look right as far as file structure and the gemspec file. However I can't quite understand what this error is wanting to tell me. There are a lot of posts out there about this error, however they pertain to specific gems like 'bcrypt' etc. I don't see much out there regarding gemspec.

[!] There was an error parsing 'Gemfile': An empty gem name is not valid. Bundler cannot continue. 
#   from /users/Kris/Desktop/Ruby-CLI-project/ruby_cli_project/Gemfile:7
#   --------------------------------------------
#
>   gamspec
#
#   --------------------------------------------
Ahmed Sbai
  • 10,695
  • 9
  • 19
  • 38

1 Answers1

0

If it is intended in Gemfile, the syntax should look like this

source 'https://rubygems.org'

gem 'rspec'
gem 'other-gem-name'

If you want to package your ruby as a gem, then create .gemspec file not Gemfile. gemspec doesn't need to be inserted inside Gemfile.

Patrick
  • 78
  • 4
  • Thank you, I wanted to make sure that was okay. I had her comment out the gemspec when she needed to run bundle install. I wasn't sure if the gemspec was necessary or not. – Nolan Hovis Jan 24 '23 at 19:06