2016-03-30 77 views
0

我正在尝试将以下项目添加到我的闲聊“https://github.com/PDaily/lita-destiny”我在闲聊中添加了lita集成。我在heroku网站上创建了一个新应用程序,我添加了全局配置变量,我的LITA_TOKEN,GITHUB_URL和BUNGIE_API_KEY。我使用了cmd和heroku工具包并登录到heroku。然后,我将目录更改为lita-destiny文件夹所在的位置。我已经完成推送拒绝未能检测到设置buildpack heroku/ruby​​

Bundle install 
Git add. 
Git add -u 
Git commit -m "heroku" 
Git push heroku master. 

我已经安装了所有的本地宝石,也在该文件夹的根目录是一个gemfile。 但是我在标题中出现错误。我也进行

的Heroku buildpacks:设置的Heroku /红宝石

2016-03-31T00:14:25+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.33 sample#load-avg-5m=0.24 sample#load-avg-15m=0.215 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13328628.0kB sample#memory-cached=482376kB sample#memory-redis=294048bytes sample#hit-rate=1 sample#evicted-keys=0 
2016-03-31T00:15:24+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.255 sample#load-avg-5m=0.235 sample#load-avg-15m=0.215 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13328504.0kB sample#memory-cached=482372kB sample#memory-redis=294048bytes sample#hit-rate=1 sample#evicted-keys=0 
2016-03-31T00:16:48.562723+00:00 heroku[api]: Release v12 created by [email protected] 
2016-03-31T00:16:48.562723+00:00 heroku[api]: Deploy 97376bc by [email protected] 
2016-03-31T00:16:48.723963+00:00 heroku[slug-compiler]: Slug compilation started 
2016-03-31T00:16:48.723974+00:00 heroku[slug-compiler]: Slug compilation finished 
2016-03-31T00:16:48.698905+00:00 heroku[web.1]: State changed from crashed to starting 
2016-03-31T00:16:48+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.22 sample#load-avg-5m=0.24 sample#load-avg-15m=0.22 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15405632.0kB sample#memory-free=13328232.0kB sample#memory-cached=482380kB sample#memory-redis=294048bytes sample#hit-rate=1 sample#evicted-keys=0 
2016-03-31T00:16:50.125875+00:00 heroku[web.1]: Starting process with command `bundle exec lita` 
2016-03-31T00:16:52.409755+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/lita-slack-1.7.2/lib/lita/adapters/slack/api.rb:63:in `call_api': Slack API call to rtm.start returned an error: invalid_auth. (RuntimeError) 
2016-03-31T00:16:52.409772+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/lita-slack-1.7.2/lib/lita/adapters/slack/api.rb:38:in `rtm_start' 
2016-03-31T00:16:52.409773+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/lita-slack-1.7.2/lib/lita/adapters/slack/rtm_connection.rb:20:in `build' 
2016-03-31T00:16:52.409774+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/lita-slack-1.7.2/lib/lita/adapters/slack.rb:22:in `run' 
2016-03-31T00:16:52.409774+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/lita-4.7.0/lib/lita/robot.rb:80:in `run' 
2016-03-31T00:16:52.409775+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/lita-4.7.0/lib/lita.rb:80:in `run' 
2016-03-31T00:16:52.409776+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/lita-4.7.0/lib/lita/cli.rb:77:in `start' 
2016-03-31T00:16:52.409778+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run' 
2016-03-31T00:16:52.409778+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command' 
2016-03-31T00:16:52.409779+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch' 
2016-03-31T00:16:52.409780+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start' 
2016-03-31T00:16:52.409800+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/bin/lita:23:in `load' 
2016-03-31T00:16:52.409782+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/gems/lita-4.7.0/bin/lita:6:in `<top (required)>' 
2016-03-31T00:16:52.409800+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.2.0/bin/lita:23:in `<main>' 
2016-03-31T00:16:53.126028+00:00 heroku[web.1]: Process exited with status 1 
2016-03-31T00:16:53.137278+00:00 heroku[web.1]: State changed from starting to crashed 

以上从Heroku的日志中最新的错误消息

+0

是否运行到上利塔BOT实例这个问题? lita-destiny是你添加到你的lita bot的插件。 – M00B

+0

@ M00B这种情况发生在我做push master的时候部署到heroku –

+0

推什么回购大师?你的Lita机器人? – M00B

回答

0

如果我理解正确你的问题,有对丽塔的工作原理有一个基本的误解。 lita gem有一个可执行文件(lita new)为您创建一个新的lita bot。然后,您将lita-destiny等插件添加到您的lita bot的Gemfile中。

所以你得到这个错误是因为你没有推送Heroku认为是Ruby应用程序的代码 - 你在推送一个gem。

你应该做的是

cd ../some/place/else 
gem install lita 
lita new 
cd lita 
echo 'web: bundle exec lita' >> Procfile 
bundle install 
git init 
git add . 
git commit -m 'Initial commit' 
heroku apps:create 
git push heroku master 

然后你就可以在同一的利塔 - 命运插件添加到您的利塔机器人的Gemfile中(你刚创建的项目),并添加config.handlers.destiny_handler.api_key = 'XXXX'lita_config.rb文件项目。您还可以将您的Slack API密钥添加到lita_config.rb文件中。

来源:lita docsheroku docs

+0

在做了git pish master之后,它说没有gemfile.lock文件是foind –

+0

忘记了一步。我的错。更新答案。 – M00B

+0

将在第二次尝试,谢谢:) –

相关问题