我是业余编码员。我创建了一个抽搐聊天机器人,现在正尝试部署它。我用不带护栏的红宝石编写了这段代码,我没有任何gemfile等。它在我的机器上可以正常工作,但是我不知道如何为Heroku创建 我这样尝试,但出现了此错误:
Enumerating objects: 18, done.
Counting objects: 100% (18/18), done.
Delta compression using up to 16 threads
Compressing objects: 100% (14/14), done.
Writing objects: 100% (18/18), 4.87 KiB | 997.00 KiB/s, done.
Total 18 (delta 1), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/ruby.tgz
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to stormy-refuge-29575.
remote:
To https://git.heroku.com/stormy-refuge-29575.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/stormy-refuge-29575.git'
答案 0 :(得分:0)
如果是红宝石,您只需要做
lit(None)
答案 1 :(得分:0)
您在应用程序中使用的所有宝石都应显示在Gemfile
中。该应用程序在您的计算机上运行的原因可能是您已在全球范围内安装了这些gem。
由于您使用的是rufus-scheduler
,selenium-webdriver
宝石,因此Gemfile
中都应包含这两种宝石,
source 'https://rubygems.org'
gem 'rufus-scheduler'
gem 'selenium-webdriver'
一旦Gemfile
存在,请运行命令bundle install
,该命令将安装gems并创建Gemfile.lock
文件。