简体   繁体   English

复制某些代码后,为什么Rails终端仍在等待输入?

[英]Why does rails terminal still await input after I copy paste in some code?

When copy pasting in some code like: 使用以下代码复制粘贴时:

params = { :user => { :email =>“yencn02@yahoo.com"} }

The console still is awaiting input, and I have to CTRL+C to escape from it. 控制台仍在等待输入,我必须按CTRL + C才能从中退出。 The console then says: 控制台然后说:

>> params
=> nil

But it works at my colleague's. 但这对我同事有用。 What's wrong? 怎么了?

You have a UTF-8 character in there which is messing things up. 您那里有一个UTF-8字符,这使事情变得混乱。 Namely the character. 字符”。 Replace it with the standard " character and it should work. 将其替换为标准的"字符,它应该可以工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将多行代码复制粘贴到 rails 控制台(例如从脚本复制粘贴) - How to copy paste multiple lines of code into rails console (e.g. copy paste from a script) 即使更新后终端仍然显示旧版本的rails - Terminal still shows older version of rails even after updating 运行Rails服务器后终端无法工作 - Terminal does not work after running rails server Rails表单输入未保存,提交后变为空白 - Rails Form Input does not save, becomes blank after I submit 为什么我在 Rails 中搭建脚手架后缺少表单中的输入? - Why am I missing an input in a form after scaffolding in Rails? 为什么我在运行 rails 测试时点击 binding.pry 或 byebug 后无法输入终端? - Why can't I type in terminal after hitting binding.pry or byebug when running rails test? 引发错误后,Rails控制台会修改终端中的键盘输入 - Rails console modifies keyboard input in terminal after an error is thrown 为什么Ruby on Rails无法呈现某些文本? - Why does Ruby on Rails not render some text? 为什么某些 ruby rails gem 在某些服务器上工作而不在其他服务器上工作? - Why does some ruby rails gem work on some server and not on others? 在Rails 3中,如何在控制器完成请求/响应周期之后完全通过控制器调用某些代码? - In Rails 3, how do I call some code via a controller but completely after the Request/Response cycle is done?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM