【发布时间】:2013-07-29 15:15:17
【问题描述】:
我的 Gemfile 中有以下行:
gem 'authlogic', :git => "git://github.com/binarylogic/authlogic.git"
当我推送到 heroku 时,我收到以下错误:
2013-07-29T15:09:28.895063+00:00 heroku[web.1]: State changed from crashed to starting
2013-07-29T15:09:32.231844+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e $RAILS_ENV -p 14117`
2013-07-29T15:09:35.063805+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/authlogic-e4b2990d6282/lib/authlogic.rb:60:in `require': /app/vendor/bundle/ruby/1.9.1/bundler/gems/authlogic-e4b2990d6282/lib/authlogic/regex.rb:15: invalid multibyte char (US-ASCII) (SyntaxError)
2013-07-29T15:09:35.063805+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/authlogic-e4b2990d6282/lib/authlogic/regex.rb:15: invalid multibyte char (US-ASCII)
2013-07-29T15:09:35.063805+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/authlogic-e4b2990d6282/lib/authlogic/regex.rb:15: syntax error, unexpected $end, expecting keyword_end
2013-07-29T15:09:35.063805+00:00 app[web.1]: ...'(?:[A-Z]{2,4}|museum|travel|онлайн)'
2013-07-29T15:09:35.064199+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.2/lib/bundler/runtime.rb:70:in `block in require'
2013-07-29T15:09:35.064199+00:00 app[web.1]: from config.ru:3:in `block in <main>'
2013-07-29T15:09:35.064496+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-07-29T15:09:35.064496+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-07-29T15:09:35.063805+00:00 app[web.1]: ... ^
2013-07-29T15:09:35.063805+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bundler/gems/authlogic-e4b2990d6282/lib/authlogic.rb:60:in `block in <top (required)>'
2013-07-29T15:09:35.063805+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bundler/gems/authlogic-e4b2990d6282/lib/authlogic.rb:6:in `each'
2013-07-29T15:09:35.064496+00:00 app[web.1]: from config.ru:1:in `<main>'
2013-07-29T15:09:35.064496+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `eval'
2013-07-29T15:09:35.064496+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:71:in `start'
2013-07-29T15:09:35.063805+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.2/lib/bundler/runtime.rb:72:in `require'
2013-07-29T15:09:35.063805+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.2/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
2013-07-29T15:09:35.064199+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.2/lib/bundler/runtime.rb:70:in `each'
2013-07-29T15:09:35.065084+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
2013-07-29T15:09:35.063805+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bundler/gems/authlogic-e4b2990d6282/lib/authlogic.rb:6:in `<top (required)>'
2013-07-29T15:09:35.064199+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.2/lib/bundler/runtime.rb:59:in `each'
2013-07-29T15:09:35.064199+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.2/lib/bundler/runtime.rb:59:in `require'
2013-07-29T15:09:35.064199+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.2/lib/bundler.rb:132:in `require'
2013-07-29T15:09:35.064199+00:00 app[web.1]: from /app/config/environment.rb:3:in `require'
2013-07-29T15:09:35.064199+00:00 app[web.1]: from /app/config/environment.rb:3:in `<top (required)>'
2013-07-29T15:09:35.064199+00:00 app[web.1]: from config.ru:3:in `require'
2013-07-29T15:09:35.064199+00:00 app[web.1]: from /app/config/application.rb:8:in `<top (required)>'
2013-07-29T15:09:35.064496+00:00 app[web.1]: from config.ru:1:in `new'
2013-07-29T15:09:35.064496+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in `load'
2013-07-29T15:09:35.064496+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
2013-07-29T15:09:35.064496+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:187:in `run_command'
2013-07-29T15:09:35.065084+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/bin/thin:6:in `<top (required)>'
2013-07-29T15:09:35.064496+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:152:in `run!'
2013-07-29T15:09:35.065084+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
2013-07-29T15:09:36.377852+00:00 heroku[web.1]: State changed from starting to crashed
2013-07-29T15:09:36.336374+00:00 heroku[web.1]: Process exited with status 1
当然,该应用程序不起作用。
对可能导致这种情况的任何想法?因为乍一看,它可能来自 AuthLogic (https://github.com/binarylogic/authlogic) 代码。
更新:
好的。最奇怪的事情刚刚发生。它自己开始的。看来我只需要给它一些时间,它现在正在工作......
这里留给以后遇到同样问题的人。
但是,最好知道导致 AuthLogic 错误的原因。
【问题讨论】:
-
你能添加完整的错误吗?还是只有这三行输出?
-
看起来 UTF-8 TLDs and IDNs 在人们能够解决他们的字符编码问题之前都会成为麻烦。
-
tadman,请参阅
sawa答案的评论——我已经在所有文件中明确声明了 UTF-8。 -
Mab879,你的愿望实现了。请参阅上面的更新日志。
标签: ruby-on-rails ruby heroku authlogic