- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
我必须在我的 Rails 4.2.3 上使用“Tiny TDS”gem,当然在 Heroku 的 cedar-14 上我不能,因为 FreeTDS 已经不在上面了。
如何在 Heroku cedar-14 上使用 FreeTDS?
我在网上查找,发现了这个:
https://github.com/foraker/heroku-buildpack-freetds
他说将它与“heroku-buildpack-multi”一起使用,这个:https://github.com/ddollar/heroku-buildpack-multi
但我不明白怎么办!
我必须在本地电脑上创建“.buildpacks”文件吗?
然后我必须“git push heroku master”?
这个程序今天仍然有效吗?
或者我必须使用这个:https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app
请帮助我,谢谢。
更新:
我找到了如何使用这个在 Heroku 上安装 FreeTDS:
https://github.com/eltiare/heroku-buildpack-freetds
用这个:
https://github.com/ddollar/heroku-buildpack-multi
使用这个 .buildpacks:
https://github.com/eltiare/heroku-buildpack-freetds.git#master
https://github.com/heroku/heroku-buildpack-ruby.git#master
但是现在,在部署之后,我得到了一个错误:
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require': libsybdb.so.5: cannot open shared object file: No such file or directory - /app/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/tiny_tds-0.6.2/tiny_tds/tiny_tds.so (LoadError)
然后应用程序崩溃。
如何修复?
这些是日志:
部署:
Deleting 2 files matching .slugignore patterns.
Fetching custom git buildpack... done
Multipack app detected
Downloading Buildpack: https://github.com/eltiare/heroku-buildpack-freetds.git
=====> Detected Framework: FreeTDS
Installing freetds into /tmp/build_5e53a70f18da19be7f6defafbfad826b/vendor/freetds
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
Writing FreeTDS configuration for subsequent buildpack
Downloading Buildpack: https://github.com/heroku/heroku-buildpack-ruby.git
Detected Framework: Ruby
Compiling Ruby/Rails
Using Ruby version: ruby-2.1.6
WARNING:
Removing `Gemfile.lock` because it was generated on Windows.
Bundler will do a full resolve so native gems are handled properly.
This may result in unexpected gem versions being used in your app.
In rare occasions Bundler may not be able to resolve your dependencies at all.
https://devcenter.heroku.com/articles/bundler-windows-gemfile
Installing dependencies using 1.9.7
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
Updating git://github.com/rails/turbolinks.git
Updating git://github.com/mileszs/wicked_pdf.git
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies......
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.7.0
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.2
Using rack 1.6.4
Using mime-types 2.6.1
Using arel 6.0.2
Using execjs 2.5.2
Using bcrypt 3.1.10
Using sass 3.4.16
Using bundler 1.9.7
Using cancancan 1.12.0
Using net-ssh 2.9.2
Using coffee-script-source 1.9.1.1
Using thor 0.19.1
Using chunky_png 1.3.4
Using multi_json 1.11.2
Using rb-fsevent 0.9.5
Using ffi 1.9.10
Using hike 1.2.3
Using tilt 1.4.1
Using cocoon 1.2.6
Using orm_adapter 0.5.0
Using htmlcompressor 0.2.0
Using rubyzip 1.1.7
Using nprogress-rails 0.1.6.7
Using pg 0.18.2
Using puma 2.12.2
Using rack-cors 0.4.0
Using rails_serve_static_assets 0.0.4
Using rails_stdout_logging 0.0.3
Using videojs_rails 4.12.6
Using rdoc 4.2.0
Using tzinfo 1.2.2
Using rack-test 0.6.3
Using warden 1.2.3
Using nokogiri 1.6.6.2
Using autoprefixer-rails 5.2.1.1
Using uglifier 2.7.1
Using mail 2.6.3
Using compass-import-once 1.0.5
Using coffee-script 2.4.1
Using net-sftp 2.1.2
Using compass-core 1.0.3
Using rb-inotify 0.9.5
Using sprockets 2.12.4
Using wicked_pdf 0.11.0 from git://github.com/mileszs/wicked_pdf.git (at master)
Using rails_12factor 0.0.3
Using sdoc 0.4.1
Using activesupport 4.2.3
Using loofah 2.0.2
Using bootstrap-sass 3.3.5.1
Using compass 1.0.3
Using rails-deprecated_sanitizer 1.0.3
Using globalid 0.3.5
Using activemodel 4.2.3
Using jbuilder 2.3.1
Using rails-html-sanitizer 1.0.2
Using rails-dom-testing 1.0.6
Using activejob 4.2.3
Using active_model_serializers 0.9.3
Using activerecord 4.2.3
Using carrierwave 0.10.0
Using actionview 4.2.3
Using carrierwave-ftp 0.2.8
Using activerecord-sqlserver-adapter 4.2.4
Using acts-as-taggable-on 3.5.0
Using ancestry 2.1.0
Using actionpack 4.2.3
Using actionmailer 4.2.3
Using railties 4.2.3
Using sprockets-rails 2.3.2
Using htmltoword 0.4.2
Using kaminari 0.16.3
Using coffee-rails 4.1.0
Using responders 2.1.0
Using jquery-rails 4.0.4
Using jquery-ui-rails 5.0.5
Using sass-rails 5.0.1
Using rails 4.2.3
Using turbolinks 3.0.0 from git://github.com/rails/turbolinks.git (at master)
Using devise 3.5.1
Using compass-rails 2.0.4
Using rails-jquery-autocomplete 1.0.1
Using chosen-rails 1.4.2
Installing tiny_tds 0.6.2
Bundle complete! 42 Gemfile dependencies, 90 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into ./vendor/bundle.
Bundle completed (12.85s)
Cleaning up the bundler cache.
Removing tiny_tds (0.6.3.rc1)
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
cp public/assets/chosen-sprite-ea6754a5be024d46e1d1723d932957a5.png public/assets/chosen-sprite.png
cp public/assets/chosen-sprite@2x-de4f9a7206a168caffa4500adc0de88b.png public/assets/chosen-sprite@2x.png
Asset precompilation completed (6.59s)
Cleaning assets
Running: rake assets:clean
###### WARNING:
Removing `Gemfile.lock` because it was generated on Windows.
Bundler will do a full resolve so native gems are handled properly.
This may result in unexpected gem versions being used in your app.
In rare occasions Bundler may not be able to resolve your dependencies at all.
https://devcenter.heroku.com/articles/bundler-windows-gemfile
###### WARNING:
No Procfile detected, using the default web server (webrick)
https://devcenter.heroku.com/articles/ruby-default-web-server
Using release configuration from last framework (Ruby).
-----> Discovering process types
Procfile declares types -> (none)
Default types for Multipack -> console, rake, web, worker
-----> Compressing... done, 62.0MB
-----> Launching... done, v10
部署后:
Release v10 created
2015-07-28T08:50:51.966282+00:00 heroku[web.1]: State changed from up to starting
2015-07-28T08:50:55.675410+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2015-07-28T08:50:56.531068+00:00 app[web.1]: Exiting
2015-07-28T08:50:59.423445+00:00 heroku[web.1]: Process exited with status 143
2015-07-28T08:51:02.826292+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 30210 -e production`
2015-07-28T08:51:06.762029+00:00 app[web.1]: /app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require': libsybdb.so.5: cannot open shared object file: No such file or directory - /app/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/tiny_tds-0.6.2/tiny_tds/tiny_tds.so (LoadError)
2015-07-28T08:51:06.762058+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `block in require'
2015-07-28T08:51:06.762060+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:240:in `load_dependency'
2015-07-28T08:51:06.762061+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.3/lib/active_support/dependencies.rb:274:in `require'
2015-07-28T08:51:06.762063+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/tiny_tds-0.6.2/lib/tiny_tds.rb:16:in `rescue in <top (required)>'
2015-07-28T08:51:06.762065+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/tiny_tds-0.6.2/lib/tiny_tds.rb:12:in `<top (required)>'
2015-07-28T08:51:06.762066+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
2015-07-28T08:51:06.762069+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
2015-07-28T08:51:06.762070+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
2015-07-28T08:51:06.762067+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
2015-07-28T08:51:06.762074+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
2015-07-28T08:51:06.762078+00:00 app[web.1]: from /app/config/application.rb:7:in `<top (required)>'
2015-07-28T08:51:06.762083+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:78:in `block in server'
2015-07-28T08:51:06.762075+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
2015-07-28T08:51:06.762085+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:75:in `server'
2015-07-28T08:51:06.762076+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
2015-07-28T08:51:06.762079+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:78:in `require'
2015-07-28T08:51:06.762084+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:75:in `tap'
2015-07-28T08:51:06.762088+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
2015-07-28T08:51:06.762096+00:00 app[web.1]: from bin/rails:4:in `<main>'
2015-07-28T08:51:06.762090+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.1.0/gems/railties-4.2.3/lib/rails/commands.rb:17:in `<top (required)>'
2015-07-28T08:51:06.762093+00:00 app[web.1]: from bin/rails:4:in `require'
2015-07-28T08:51:07.545701+00:00 heroku[web.1]: Process exited with status 1
2015-07-28T08:51:07.566686+00:00 heroku[web.1]: State changed from starting to crashed
更新:
如果我运行 heroku run bash
并转到这里:
cd /vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/tiny_tds-0.6.2/tiny_tds/
ld tiny_tds.so
我有这个:
ld: warning: libsybdb.so.5, needed by tiny_tds.so, not found (try using -rpath or -rpath-link)
ld: warning: cannot find entry symbol _start; not setting start address
tiny_tds.so: undefined reference to `rb_iv_get'
tiny_tds.so: undefined reference to `dbgetuserdata'
tiny_tds.so: undefined reference to `rb_ll2inum'
tiny_tds.so: undefined reference to `dbresults'
tiny_tds.so: undefined reference to `dbconvert'
tiny_tds.so: undefined reference to `rb_raise'
tiny_tds.so: undefined reference to `rb_exc_new_cstr'
tiny_tds.so: undefined reference to `dbsettime'
tiny_tds.so: undefined reference to `rb_cObject'
tiny_tds.so: undefined reference to `dbcmd'
tiny_tds.so: undefined reference to `dbsetlversion'
tiny_tds.so: undefined reference to `dbinit'
tiny_tds.so: undefined reference to `rb_ary_entry'
tiny_tds.so: undefined reference to `rb_cTime'
tiny_tds.so: undefined reference to `rb_enc_associate'
tiny_tds.so: undefined reference to `rb_eval_string'
tiny_tds.so: undefined reference to `rb_scan_args'
tiny_tds.so: undefined reference to `dbcanquery'
tiny_tds.so: undefined reference to `rb_num2int'
tiny_tds.so: undefined reference to `rb_hash_aref'
tiny_tds.so: undefined reference to `rb_funcall'
tiny_tds.so: undefined reference to `rb_obj_freeze'
tiny_tds.so: undefined reference to `dbsetuserdata'
tiny_tds.so: undefined reference to `ruby_xfree'
tiny_tds.so: undefined reference to `dbclose'
tiny_tds.so: undefined reference to `rb_ary_new'
tiny_tds.so: undefined reference to `tdsdbopen'
tiny_tds.so: undefined reference to `rb_data_object_alloc'
tiny_tds.so: undefined reference to `rb_enc_find'
tiny_tds.so: undefined reference to `dbcancel'
tiny_tds.so: undefined reference to `dbmsghandle'
tiny_tds.so: undefined reference to `dbcount'
tiny_tds.so: undefined reference to `rb_thread_blocking_region'
tiny_tds.so: undefined reference to `rb_ary_new_capa'
tiny_tds.so: undefined reference to `dbsetlname'
tiny_tds.so: undefined reference to `dbnumcols'
tiny_tds.so: undefined reference to `dbdead'
tiny_tds.so: undefined reference to `rb_Rational'
tiny_tds.so: undefined reference to `dbhasretstat'
tiny_tds.so: undefined reference to `rb_hash_aset'
tiny_tds.so: undefined reference to `ruby_xmalloc'
tiny_tds.so: undefined reference to `rb_check_type'
tiny_tds.so: undefined reference to `dbsqlsend'
tiny_tds.so: undefined reference to `rb_yield'
tiny_tds.so: undefined reference to `dbtds'
tiny_tds.so: undefined reference to `rb_string_value_ptr'
tiny_tds.so: undefined reference to `dbsetlogintime'
tiny_tds.so: undefined reference to `dbnextrow'
tiny_tds.so: undefined reference to `dbsqlexec'
tiny_tds.so: undefined reference to `dbloginfree'
tiny_tds.so: undefined reference to `rb_gc_mark'
tiny_tds.so: undefined reference to `rb_iv_set'
tiny_tds.so: undefined reference to `dbfreebuf'
tiny_tds.so: undefined reference to `dbuse'
tiny_tds.so: undefined reference to `rb_str_new_cstr'
tiny_tds.so: undefined reference to `rb_cRegexp'
tiny_tds.so: undefined reference to `dbsetversion'
tiny_tds.so: undefined reference to `dberrhandle'
tiny_tds.so: undefined reference to `rb_define_method'
tiny_tds.so: undefined reference to `dbdata'
tiny_tds.so: undefined reference to `rb_const_get'
tiny_tds.so: undefined reference to `rb_global_variable'
tiny_tds.so: undefined reference to `dbretstatus'
tiny_tds.so: undefined reference to `rb_enc_from_encoding'
tiny_tds.so: undefined reference to `dbdatecrack'
tiny_tds.so: undefined reference to `rb_exc_raise'
tiny_tds.so: undefined reference to `rb_define_protected_method'
tiny_tds.so: undefined reference to `rb_float_new'
tiny_tds.so: undefined reference to `dbcoltypeinfo'
tiny_tds.so: undefined reference to `dbdatlen'
tiny_tds.so: undefined reference to `rb_define_alloc_func'
tiny_tds.so: undefined reference to `rb_define_module'
tiny_tds.so: undefined reference to `rb_str_new'
tiny_tds.so: undefined reference to `dbrows'
tiny_tds.so: undefined reference to `dblogin'
tiny_tds.so: undefined reference to `dbcolname'
tiny_tds.so: undefined reference to `dbcoltype'
tiny_tds.so: undefined reference to `rb_warn'
tiny_tds.so: undefined reference to `rb_define_class_under'
tiny_tds.so: undefined reference to `rb_intern2'
tiny_tds.so: undefined reference to `rb_obj_call_init'
tiny_tds.so: undefined reference to `dbsqlok'
tiny_tds.so: undefined reference to `rb_str_intern'
tiny_tds.so: undefined reference to `rb_ary_store'
tiny_tds.so: undefined reference to `rb_fix2int'
tiny_tds.so: undefined reference to `rb_hash_new'
这是什么:
libsybdb.so.5 ?
另一项更新:
我还尝试将下载 url 更改为:
https://fossies.org/linux/privat/freetds-0.95.19.tar.gz
但是什么都没有,同样的错误:
LoadError: libsybdb.so.5: cannot open shared object file: No such file or directory - /tmp/build_77614230336e05e686009861d71719ea/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/tiny_tds-0.6.2/tiny_tds/tiny_tds.so
最佳答案
好像其他人也遇到过这个问题。查看this particular procedure这似乎奏效了。
关于ruby - Heroku FreeTDS,如何将 Rasil SQL Server 与带有 Multi Buildpacks 的 TinyTDS 一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31604378/
SQL、PL-SQL 和 T-SQL 之间有什么区别? 谁能解释一下这三者之间的区别,并提供每一个的相关使用场景? 最佳答案 SQL 是一种对集合进行操作的查询语言。 它或多或少是标准化的,几乎所有关
这个问题已经有答案了: What is the difference between SQL, PL-SQL and T-SQL? (6 个回答) 已关闭 9 年前。 我对 SQL 的了解足以完成我的
我在数据库中有一个 USER 表。该表有一个 RegistrationDate 列,该列有一个默认约束为 GETDATE()。 使用 LINQ 时,我没有为 RegistrationDate 列提供任
我有一个可能属于以下类型的字符串 string expected result 15-th-rp 15 15/12-rp 12 15-12-th
很难说出这里问的是什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或言辞激烈,无法以目前的形式合理回答。如需帮助澄清此问题以便可以重新打开,visit the help center . 9年前关闭
我有一个存储过程(称为 sprocGetArticles),它从文章表中返回文章列表。这个存储过程没有任何参数。 用户可以对每篇文章发表评论,我将这些评论存储在由文章 ID 链接的评论表中。 有什么方
我目前正在做一个 *cough*Oracle*cough* 数据库主题。讲师介绍embedded SQL作为让其他语言(例如 C、C++)与(Oracle)数据库交互的方式。 我自己做了一些数据库工作
SQL Server 中 SQL 语句的最大长度是多少?这个长度是否取决于 SQL Server 的版本? 例如,在 DECLARE @SQLStatement NVARCHAR(MAX) = N'S
这个问题已经有答案了: Simple way to transpose columns and rows in SQL? (9 个回答) 已关闭 8 年前。 CallType
预先感谢您对此提供的任何帮助。 假设我有一个查询,可以比较跨年的数据,从某个任意年份开始,永无止境(进入 future ),每年同一时期直到最后一个完整的月份(其特点是一月数据永远不会显示至 2 月
我在数据库中有一个 USER 表。该表有一个 RegistrationDate 列,该列的默认约束为 GETDATE()。 使用 LINQ 时,我没有为 RegistrationDate 列提供任何数
下面是我试图用来检查存储过程是否不存在然后创建过程的 sql。它会抛出一个错误:Incorrect syntax near the keyword 'PROCEDURE' IF NOT EXISTS
我有一个同事声称动态 SQL 在许多情况下比静态 SQL 执行得更快,所以我经常看到 DSQL 到处都是。除了明显的缺点,比如在运行之前无法检测到错误并且更难阅读,这是否准确?当我问他为什么一直使用
来自 lobodava 的动态 SQL 查询是: declare @sql nvarchar(4000) = N';with cteColumnts (ORDINAL_POSITION, CO
使用 SQL Server 中的存储过程执行动态 SQL 命令的现实优点和缺点是什么 EXEC (@SQL) 对比 EXEC SP_EXECUTESQL @SQL ? 最佳答案 sp_executes
我有这个有效的 SQL 查询: select sum(dbos.Points) as Points, dboseasons.Year from dbo.StatLines dbos i
我正在调试一些构建成功运行的 SQL 命令的代码。 然而,在查询结束时,查询结果似乎被写入了一个文本文件。 完整的查询如下 echo SELECT DATE,DATETABLE,DATE,APPDAT
我有一些创建表的 .sql 文件(MS SQL 数据库): 表_1.sql: IF OBJECT_ID (N'my_schema.table1', N'U') IS NOT NULL DROP TAB
我写了下面的 SQL 存储过程,它一直给我错误@pid = SELECT MAX(... 整个过程是: Alter PROCEDURE insert_partyco @pname varchar(20
我在 SQL Server 2005 中有包含两列 Fruit 和 Color 的表,如下所示 Fruit Colour Apple Red Orange
我是一名优秀的程序员,十分优秀!