Amir Nabaei
Amir Nabaei

Reputation: 1642

Ruby on Rails console, beginner error

In rails console when I want to add a column to my table with below command

  2.1.1 :001 >post = Post.new( :title => "first post", :job => "first job”)

it gives me

 2.1.1 :002">
 2.1.1 :003"> 
 2.1.1 :004"> 

and doing nothing! I don't know what is problem here?

Upvotes: 0

Views: 61

Answers (2)

bjhaid
bjhaid

Reputation: 9762

if you copied and pasted the code the problem is with the last double-quotes

'”'.ord #=> 8221
'"'.ord #=> 34

'”' == '"' #=> false

Upvotes: 1

BroiSatse
BroiSatse

Reputation: 44715

You didn't close quotes.

"first job”

Note that are not the same as " Console is waiting for you to close all the brackets and quotes before it executes the command.

Upvotes: 1

Related Questions