我的 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 错误。