Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error Parsing 'Gemfile'

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.

like image 435
Eric Park Avatar asked Jan 23 '16 00:01

Eric Park


People also ask

What is Gemfile?

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.

Where is Gemfile in Ruby?

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 .

How do you install gems you added to your Gemfile?

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.


1 Answers

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.

like image 142
Jefferson Avatar answered Oct 17 '22 16:10

Jefferson