I am working on a learning rails project on
http://railsapps.github.io/installrubyonrails-mac.html
I am on the Rails Example Applications section, but when I run
bundle install --without production
I receive this error:
[!] There was an error parsing `Gemfile`: no .<digit> floating literal anymore; put 0 before dot - ruby ‘2.3.0’
^
/Users/eric.park/workspace/learn-rails/Gemfile:2: syntax error, unexpected tFLOAT, expecting '('
ruby ‘2.3.0’
^. Bundler cannot continue.
# from /Users/eric.park/workspace/learn-rails/Gemfile:2
# -------------------------------------------
# source 'https://rubygems.org'
> ruby ‘2.3.0’
# gem 'rails', '4.2.5'
# -------------------------------------------
I am new to rails, so if anyone can explain what this error generally means, and how I can address it if it shows up again that would be really helpful.
A Gemfile is a file that is created to describe the gem dependencies required to run a Ruby program. A Gemfile should always be placed in the root of the project directory.
A Gemfile describes the gem dependencies required to execute associated Ruby code. Place the Gemfile in the root of the directory containing the associated code. For instance, in a Rails application, place the Gemfile in the same directory as the Rakefile .
run the command bundle install in your shell, once you have your Gemfile created. This command will look your Gemfile and install the relevant Gems on the indicated versions. The Gemfiles are installed because in your Gemfile you are pointing out the source where the gems can be downloaded from. Save this answer.
It is the quotation problem.
Try manually typing the sentence again with either single quote or double quote.
ruby '2.3.0'
or ruby "2.3.0"
This should fix it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With