使用任何 Heroku 命令时出错

发布于 2024-10-13 04:32:30 字数 1228 浏览 0 评论 0原文

每当我使用任何 Heroku 命令时,我都会收到此错误。到目前为止,这些命令仍然有效,所以我没有考虑太多:

/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31: command not found:  git config heroku.remote 

但是现在当我尝试 heroku db:pull 时,我收到此错误。不确定两者是否相关,但无论哪种方式,我都可以帮助解决一个或两个问题。

/Library/Ruby/Gems/1.8/gems/taps-0.3.15/bin/schema:3:in `require': no such file to load -- rubygems (LoadError)
    from /Library/Ruby/Gems/1.8/gems/taps-0.3.15/bin/schema:3
Schema:        100% |==========================================| Time: 00:00:08
Receiving indexes
/Library/Ruby/Gems/1.8/gems/taps-0.3.15/bin/schema:3:in `require': no such file to load -- rubygems (LoadError)
    from /Library/Ruby/Gems/1.8/gems/taps-0.3.15/bin/schema:3
schema_migrat: 100% |==========================================| Time: 00:00:00
Receiving data
13 tables, 6,957 records
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/lib/sqlite3/errors.rb:62:in `check': SQLite3::SQLException: PRIMARY KEY must be unique (Sequel::DatabaseError)
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/lib/sqlite3/resultset.rb:56:in `check'

Any time I use any Heroku command I get this error. So far the commands have still worked so I haven't thought much about it:

/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31: command not found:  git config heroku.remote 

However now when I try heroku db:pull, I get this error. Not sure if the two are related, but either way I could use help solving one or both.

/Library/Ruby/Gems/1.8/gems/taps-0.3.15/bin/schema:3:in `require': no such file to load -- rubygems (LoadError)
    from /Library/Ruby/Gems/1.8/gems/taps-0.3.15/bin/schema:3
Schema:        100% |==========================================| Time: 00:00:08
Receiving indexes
/Library/Ruby/Gems/1.8/gems/taps-0.3.15/bin/schema:3:in `require': no such file to load -- rubygems (LoadError)
    from /Library/Ruby/Gems/1.8/gems/taps-0.3.15/bin/schema:3
schema_migrat: 100% |==========================================| Time: 00:00:00
Receiving data
13 tables, 6,957 records
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/lib/sqlite3/errors.rb:62:in `check': SQLite3::SQLException: PRIMARY KEY must be unique (Sequel::DatabaseError)
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/lib/sqlite3/resultset.rb:56:in `check'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

筑梦 2024-10-20 04:32:30

Heroku 在这里(在底部)有一些关于此的信息:

疑难解答

未找到命令

在某些机器上,您的路径可能不是
正确设置以运行二进制 gem。如果
你得到一个命令未找到错误,你
需要添加 ruby​​gems 可执行文件
目录到您的路径。你可以找到
通过运行 EXECUTABLE_DIRECTORY

$gem环境

然后设置
您的路径包括适当的
目录:

$ 导出 PATH=/opt/ruby-enterprise-1.8.6-20090201/bin:$PATH

它链接回这篇 StackOverflow 文章(如何元): 如何在 Ubuntu 中使用 gems?

Heroku has some information on this here (down at the bottom):

Troubleshooting

Command not found

On some machines your path may not be
set correctly to run binary gems. If
you get a command not found error, you
need to add the rubygems executable
directory to your path. You can find
the EXECUTABLE_DIRECTORY by running

$ gem environment

And then setting
your path to include the appropriate
directory:

$ export PATH=/opt/ruby-enterprise-1.8.6-20090201/bin:$PATH

And it links back to this StackOverflow article (how meta): How do I use gems with Ubuntu?

黄昏下泛黄的笔记 2024-10-20 04:32:30

我不确定其他错误,但这个错误:

SQLite3::SQLException: PRIMARY KEY must be unique (Sequel::DatabaseError)

是因为您试图将重复的主键插入表中。但不确定为什么会发生这种情况。

I'm not sure about the other errors, but this one:

SQLite3::SQLException: PRIMARY KEY must be unique (Sequel::DatabaseError)

is because you are trying to insert a duplicate primary key into a table. Not sure why that is occurring, though.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文