When I run a multiline statement in the Rails 3.0.1 console, pressing Enter does not actually run the statement. Instead, it jumps to a new console line, and the cursor has a tab to the right. Then I have to run the base line (e.g. p "hey"), and then the multi-line statement will be executed.
ruby-1.9.2-p0 > images = Image.all;images.each do |im|; if im.imagestore_width.blank?;im.save;end;
ruby-1.9.2-p0 > p "hey"
I have been doing this for so long and it worked fine. But now I have a problem in the console, and this could be related. When I ran the above code, instead of working as usual, it just switched to a new console line with? added
ruby-1.9.2-p0 > images = Image.all;images.each do |im|; if im.imagestore_width.blank?;im.save;end;
ruby-1.9.2-p0 > p "hey"
ruby-1.9.2-p0 ?>
When this happens, I cannot exit the console
ruby-1.9.2-p0 ?> exit
ruby-1.9.2-p0 ?> ^C
Are these issues related? How can I fix them?
source
share