gpt4 book ai didi

ruby - Heroku FreeTDS,如何将 Rasil SQL Server 与带有 Multi Buildpacks 的 TinyTDS 一起使用

转载 作者:数据小太阳 更新时间:2023-10-29 07:19:45 26 4
gpt4 key购买 nike

我必须在我的 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com