簡體   English   中英

Heroku FreeTDS,如何將Rasil SQL Server與帶有Multi Buildpacks的TinyTDS一起使用

[英]Heroku FreeTDS, how to use Rasil SQL Server with TinyTDS with Multi Buildpacks

我必須使用我的Rails 4.2.3中的“Tiny TDS”寶石,當然還有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

另一個更新

我還嘗試將下載網址更改為:

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

似乎其他人已經面臨這個問題。 看看這個似乎有效的特殊程序

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM