我在Windows Vista上使用rails 3.0.3版和ruby 1.9.2p136版(2010-12-15)。腳本控制檯給了我以下錯誤:導軌控制檯不起作用
加載開發環境(滑軌3.0.3) C:/privat/Ruby192/lib/ruby/site_ruby/1.9.1/rbreadline.rb:2116:在block in _rl_read_init_file': invalid byte sequence in UTF 8 (ArgumentError) from C:/privat/Ruby192/lib/ruby/site_ruby/1.9.1/rbreadline.rb:2114:in
each_line」 從C:/privat/Ruby192/lib/ruby/site_ruby/1.9.1/rbreadline.rb:2114:在_rl_read_init_file' from C:/privat/Ruby192/lib/ruby/site_ruby/1.9.1/rbreadline.rb:2080:in
rl_read_init_file' from C:/privat/Ruby192/lib/ruby/site_ruby/1.9.1/rbreadline.rb :2500:readline_initialize_everything' from C:/privat/Ruby192/lib/ruby/site_ruby/1.9.1/rbreadline.rb:3726:in
rl_initialize' from C:/privat/Ruby192/lib/ruby/site_ruby/1.9.1/rbreadline.rb:4720:in readline' from C:/privat/Ruby192/lib/ruby/site_ruby/1.9.1/readline.rb:40:in
readline' from C:/privat/Ruby192/lib/ruby/1.9 .1/irb/input-method.rb:115:在gets' from C:/privat/Ruby192/lib/ruby/1.9.1/irb.rb:139:in
塊(2個級別)中的eval_input' from C:/ priv at/Ruby192/lib/ruby/1.9.1/irb.rb:273:在signal_status' from C:/privat/Ruby192/lib/ruby/1.9.1/irb.rb:138:in
塊中eval_input' from C:/privat/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:188 :call' from C:/privat/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:188:in
buf_input' from C:/privat/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:103:in getc' from C:/privat/Ruby192/lib/ruby/1.9.1/irb/slex.rb:205:in
match_io' from C:/privat/Ruby192/lib/ruby/1.9 .1/irb/slex.rb:75:match' from C:/privat/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:286:in
令牌' from C:/privat/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:262:in lex' from C:/privat/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:233:in
block(2 levels)in來自C:/privat/Ruby192/lib/ruby/1.9的來自C:/privat/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:229:在loop' from C:/privat/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in
塊中的each_top_level_statement' '中的每一個塊' 中。 1/irb/ruby-lex.rb:228:在catch' from C:/privat/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in
each_top_level_statement' from C:/ pr ivat/Ruby192/lib/ruby/1.9.1/irb.rb:155:在eval_input' from C:/privat/Ruby192/lib/ruby/1.9.1/irb.rb:70:in
塊中從C:/privat/Ruby192/lib/ruby/1.9.1/irb.rb開始' :69:在catch' from C:/privat/Ruby192/lib/ruby/1.9.1/irb.rb:69:in
開始' from C:/privat/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands/console.rb:44:in start' from C:/privat/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands/console.rb:8:in
start' from C:/ privat /Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands.rb:23:in <top (required)>' from script/rails:6:in
需要 ' 從腳本/導軌:6:`'
我能做什麼?
你在'腳本/ Rails的有哪些? – Nerian 2011-01-08 19:24:06
你試過執行`rails console`嗎?這就是如何在Rails3中啓動控制檯(即不再使用`script`命令)。 – 2011-01-08 21:44:25