我曾问一个较早的问题,其并未得到任何回复.
基本上我invalid database url在尝试时会出错heroku db:push.
我想我可以尝试显式提供数据库URL.
我试过了:
heroku db:push postgres://postgres@localhost/myrailsdb
但这给了错误:
Failed to connect to database:
Sequel::DatabaseConnectionError -> PGError fe_sendauth: no password supplied
Run Code Online (Sandbox Code Playgroud)
提供用户名和密码的格式是什么?
我运行以下命令将本地数据库的内容推送到Heroku:
heroku db:push --app my-app
Run Code Online (Sandbox Code Playgroud)
从我的家用电脑这完美无缺,但从我的工作电脑我得到这个错误:
点击服务器错误:PGError:错误:时区位移超出范围:"2011-11-15 12:00:00.000000 + 5894114400"
我不确定那个日期的来源,我无法在任何地方的数据中找到它.有什么想法正在发生和/或如何修复它?
当用户单击我的视图时,我需要一个特定的方法来运行.当用户双击时,我需要另外一种方法.
问题是双击会触发单击,它会在我的逻辑中引入错误.我不能使用UIGestureRecognizer,因为我需要跟踪这些点.
我尝试了一些布尔,但没有机会.我也试过了cancel/perfomSelector-delay技术,但它不起作用(这很奇怪,因为其他论坛上的其他人说它有效,也许模拟器触摸检测有所不同?)
我试图让用户设置板块的位置(拖动,旋转),但我需要知道片段交叉点,剪切到板区域等,这就是为什么一个简单的布尔值不能解决问题.
提前致谢!
我正在尝试将我的sqlite3数据库迁移到postgresql,但我无法通过此错误.
当我跑 taps server sqlite://db/development.sqlite3 [user] [password]
我一直在 /Users/phillipjarrar/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/sinatra-1.0/lib/sinatra/base.rb:298:in <module:Templates> : uninitialized constant Tilt::CompileSite (NameError)
我在将数据从我的开发数据库推送到Heroku时遇到了问题.我决定切换到PostgreSQL作为我的开发数据库并更新了database.yml并从gemfiles中删除了sqlite gem.
该应用程序运行良好对PostgreSQL但当我尝试运行命令时:
heroku db:push
Run Code Online (Sandbox Code Playgroud)
我得到一个令人费解的SQLite错误,因为我的项目中没有对sqlite的引用:
! Taps Load Error: cannot load such file -- sqlite3
! You may need to install or update the taps gem to use db commands.
! On most systems this will be:
!
! sudo gem install taps
Run Code Online (Sandbox Code Playgroud)
这是我的database.yml文件:
development:
adapter: postgresql
encoding: unicode
database: xxxx
pool: 5
timeout: 5000
username: xxxx
password: xxxx
test:
adapter: postgresql
encoding: unicode
database: test
pool: 5
timeout: 5000
username: xx
password: xx
production:
adapter: postgresql
encoding: unicode …Run Code Online (Sandbox Code Playgroud) 首先,我正在使用RVM ...而且我对管理gem列表知之甚少.
所以,我尝试使用heroku db:push将我的数据库推送到heroku,我收到以下错误:
$ sudo heroku db:push
Taps Load Error: no such file to load -- taps/operation
You may need to install or update the taps gem to use db commands.
On most systems this will be:
sudo gem install taps
Run Code Online (Sandbox Code Playgroud)
我安装了水龙头(sudo gem安装水龙头,现在点击0.3.23),我有最新的heroku.不知道为什么会发生这种情况......而且我似乎无法在网上找到很多信息.我尝试运行sudo heroku db:push,但这根本没有改变任何东西.
我也尝试在本地安装gem(?),但这给了我一个gem权限错误.
关于这里可能发生什么的任何想法?
我看过Heroku的Taps项目(http://devcenter.heroku.com/articles/taps),但是对外键有很大的限制,所以我对使用它感到不舒服.
我想做的就是安全地获取我的生产数据并将其放在我的临时应用程序上,以便两者更紧密地匹配.建议吗?
我收到以下错误消息:
heroku db:pull --debug postgres://USERNAME:PASSWORD@localhost/test
Loaded Taps v0.3.23
Warning: Data in the database 'postgres://USERNAME:PASSWORD@localhost/test' will be overwritten and will not be recoverable.
Receiving schema
Unable to fetch tables information from http://heroku:foo9dsfsdfsdb465ar@taps19.heroku.com. Please check the server log.
Run Code Online (Sandbox Code Playgroud)
上面的命令不会在日志中生成任何可以使用"heroku logs"查看的消息.
知道我做错了什么吗?
我正在尝试从我的Rails应用程序进行本地备份,该应用程序部署到Heroku,并遇到问题.我按照这里的说明操作:http://docs.heroku.com/taps并安装了Taps.
我有两种类型的错误.我在本地创建了一个SQLite数据库,并尝试使用此命令提取数据:
(sudo)heroku db:pull sqlite://Users/username/folder/testbackup.db
要么
(sudo)heroku db:pull sqlite:// username:password@localhost/Users/username/folder/testbackup.db
但不管怎样,我得到了这个:
无法连接数据库:Sequel :: DatabaseConnectionError - > SQLite3 :: CantOpenException:无法打开数据库:无法打开数据库文件
或者,我尝试让Taps在我的应用程序中自动检测开发数据库并重写它,尽管这不是我想要的.然后我开始得到如下错误:
/opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:777:in
report_activate_error': RubyGem version error: sequel(3.15.0 not ~> 3.13.0) (Gem::LoadError) from /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:211:in激活'from /opt/local/lib/ruby/site_ruby/1.8/rubygems.rb:1056:in'gem'from/Library /红宝石/宝石/ 1.8 /宝石/水龙头-0.3.10 /斌/架构:4
并最终
/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必须是唯一的(Sequel :: DatabaseError)
非常感谢,我开始尽快备份这些数据非常重要!
我一直在使用Heroku和Taps宝石一段时间,经常做一个heroku db:push将我的数据库推向生产.
今天早上我注意到一条消息,Heroku宝石已被弃用,已被Heroku Toolbelt取代.所以我卸载了宝石并安装了Heroku Toolbelt.
下次我去推送我的数据库时出现以下错误:
! Taps Load Error: cannot load such file -- taps/operation
! You may need to install or update the taps gem to use db commands.
! On most systems this will be:
!
! sudo gem install taps
Run Code Online (Sandbox Code Playgroud)
Heroku和Taps都已正确安装,但令人沮丧的是我已经尝试按照说明('安装或更新taps gem来使用db命令')而没有成功.(重新)安装顺利但我在尝试推送数据库时仍然遇到上述错误.有人可以建议修复吗?我正在使用rbenv.