cloudfoundry / ruby-buildpack Goto Github PK
View Code? Open in Web Editor NEWCloud Foundry buildpack for Ruby, Sinatra and Rails
Home Page: http://docs.cloudfoundry.org/buildpacks/
License: Apache License 2.0
Cloud Foundry buildpack for Ruby, Sinatra and Rails
Home Page: http://docs.cloudfoundry.org/buildpacks/
License: Apache License 2.0
The README talks about running bin/package and has a link to it, but that file doesn't exist.
Hi There,
As you may be aware the Ruby buildpack currently includes Ruby 2.0.0 [1]. As maintenance support for Ruby 2.0 will be removed on February 24th [2] we would like to remove support for version 2.0.0 in the near future.
Our preference is to move forward with the changes to the buildpack by 3/1/2016. If you have any concerns or feedback please comment on this issue.
[1] - https://github.com/cloudfoundry/ruby-buildpack/blob/master/manifest.yml#L97-L100
[2] - https://www.ruby-lang.org/en/news/2015/12/16/ruby-2-0-0-p648-released/
So I think this is just a "noisy" warning, not even sure if means anything.
When ever I do a "cf push" of my app into Cloud Foundry, I get the following warning.
No Procfile detected, using the default web server (webrick)
https://devcenter.heroku.com/articles/ruby-default-web-server
My manifest.yaml file has
command: rackup -p $PORT --server thin ./config.ru
And indeed I have no Procfile.
I can also verify it is using thin, not webbrick. So where is this error coming from?
I can make it go away, by putting that same line from my manifest.yaml file into the Procfile.
Either way, it is not using Webbrick.
Last question, is there a better post things that are more of questions than actual issues? This could just me not knowing what I am doing, I am new to CF in general.
-----> Downloaded app package (52K)
-----> Downloaded app buildpack cache (6.1M)
!
! Invalid RUBY_VERSION specified: ruby-2.1.0
! Valid versions: ruby-1.9.3, ruby-1.9.2, ruby-1.8.7, ruby-2.0.0
!
Using the latest Heroku Ruby buildpack https://github.com/heroku/heroku-buildpack-ruby does work. Sync with upstream?
Ruby version: 2,.1.3
Org: Pivotal Feedback
Space: staging
We're trying to push a new scheduler/cron app for our existing web app. The push fails during the bundle step with the following message:
FAILED
Server error, status code: 400, error code: 170001, message: Staging error: cannot get instances since staging failed
The commit we're pushing is https://github.com/pivotal/pivotal-feedback/commit/1909f0421933735e84a7784c53d056053f699616
We deleted one of our apps that was initially deployed using ruby-buildpack 1.1.2, then redeployed and got the same failure during push.
Dropping the ruby version down to 2.1.1, and specifying ruby-buildpack 1.1.2 allows us to deploy without issues.
When requiring readline
, we get this error:
/home/vcap/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb/completion.rb:9:in `require': libreadline.so.5: cannot open shared object file: No such file or directory
We resolved the issue by including https://github.com/cloudfoundry/php-buildpack/raw/master/builds/src/lib/libreadline.so.5 in the top level directory of our Rails application.
Should the buildpack handle this by default?
It's kinda scary to watch the log output as an app is deploying when there's a big red block of text. Seems like it should all go to STDOUT:
2014-12-19T16:50:57.48-0800 [STG] OUT -----> Downloaded app buildpack cache (66M)
2014-12-19T16:51:01.51-0800 [STG] ERR Cloning into '/tmp/buildpacks/ruby-buildpack'...
2014-12-19T16:51:02.84-0800 [STG] ERR Note: checking out '48a89f7ed6814cfce869bbaf9acb945baa10bd2f'.
2014-12-19T16:51:02.84-0800 [STG] ERR You are in 'detached HEAD' state. You can look around, make experimental
2014-12-19T16:51:02.84-0800 [STG] ERR changes and commit them, and you can discard any commits you make in this
2014-12-19T16:51:02.84-0800 [STG] ERR state without impacting any branches by performing another checkout.
2014-12-19T16:51:02.84-0800 [STG] ERR If you want to create a new branch to retain commits you create, you may
2014-12-19T16:51:02.84-0800 [STG] ERR do so (now or later) by using -b with the checkout command again. Example:
2014-12-19T16:51:02.84-0800 [STG] ERR git checkout -b new_branch_name
2014-12-19T16:51:03.05-0800 [STG] OUT Submodule 'buildpack-packager' (https://github.com/cf-buildpacks/buildpack-packager.git) registered for path 'buildpack-packager'
2014-12-19T16:51:03.10-0800 [STG] ERR Cloning into 'buildpack-packager'...
2014-12-19T16:51:03.38-0800 [STG] OUT Submodule path 'buildpack-packager': checked out 'fec9c4598a6496fb9fa02c288076dc120754b0b5'
Fail to run cf mysql broker : https://github.com/cloudfoundry/cf-mysql-broker
Looks this buildpack contains some prebuilt rails, which conflict with rails on Gemfile of cf-mysql-broker
Hi,
Currently the ruby-buildpack determines the rails adapter from the URI scheme while laying out the database.yml. As we all know the adapter name for accessing db2 or Informix database is ibm_db. Request you to have a check in the create_database_yml method in file ruby.rb under lib/language_pack, to change adapter name to ibm_db if database being connected to is DB2 or Informix.
Also, in the dea_ng project I see that there is a hash map defining the mappings of database to adapter names and URI being built out of it to set DATABASE_URL. Would that code base be used in this project too. If yes, then it would be good if the above requested mapping could get into dea_ng code base too.
Thanks
Praveen
When using v1.2.1 of the ruby buildpack we seem to have problems loading a jar during staging that we didn't have on 1.2.0!
This is from a broken 1.2.1 deployment
Restaging app app-name in org org-name / space sms...
-----> Downloaded app package (91M)
-----> Downloaded app buildpack cache (65M)
-------> Buildpack version 1.2.1
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-1.9.3-jruby-1.7.11
-----> Installing JVM: openjdk1.8-latest
Picked up JAVA_TOOL_OPTIONS: -Xmx768m -Djava.rmi.server.useCodebaseOnly=true
-----> Installing dependencies using 1.7.12
resulting in the following error during staging
RR /home/vcap/app/vendor/bundle/jruby/1.9/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_jdbc_connection.rb:38:in `(root)': ERROR: ActiveRecord oracle_enhanced adapter could not load Oracle JDBC driver. Please install Oracle JDBC library. (LoadError)
2015-02-17T12:02:57.80-0500 [App/0] ERR from org/jruby/RubyKernel.java:1085:in `require'
2015-02-17T12:02:57.80-0500 [App/0] ERR from /home/vcap/app/vendor/bundle/jruby/1.9/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
2015-02-17T12:02:57.80-0500 [App/0] ERR from /home/vcap/app/vendor/bundle/jruby/1.9/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
2015-02-17T12:02:57.80-0500 [App/0] ERR from /home/vcap/app/vendor/bundle/jruby/1.9/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
2015-02-17T12:02:57.80-0500 [App/0] ERR from /home/vcap/app/vendor/bundle/jruby/1.9/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_connection.rb:1:in `(root)'
2015-02-17T12:02:57.80-0500 [App/0] ERR from org/jruby/RubyKernel.java:1085:in `require'
2015-02-17T12:02:57.80-0500 [App/0] ERR from /home/vcap/app/vendor/bundle/jruby/1.9/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
2015-02-17T12:02:57.80-0500 [App/0] ERR from /home/vcap/app/vendor/bundle/jruby/1.9/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
2015-02-17T12:02:57.80-0500 [App/0] ERR from /home/vcap/app/vendor/bundle/jruby/1.9/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
2015-02-17T12:02:57.80-0500 [App/0] ERR from /home/vcap/app/vendor/bundle/jruby/1.9/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_connection.rb:116:in `(root)'
2015-02-17T12:02:57.80-0500 [App/0] ERR from org/jruby/RubyKernel.java:1085:in `require'
2015-02-17T12:02:57.80-0500 [App/0] ERR from /home/vcap/app/vendor/bundle/jruby/1.9/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
2015-02-17T12:02:57.80-0500 [App/0] ERR from /home/vcap/app/vendor/bundle/jruby/1.9/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
2015-02-17T12:02:57.80-0500 [App/0] ERR from /home/vcap/app/vendor/bundle/jruby/1.9/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
2015-02-17T12:02:57.80-0500 [App/0] ERR from /home/vcap/app/vendor/bundle/jruby/1.9/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:1:in `(root)'
2015-02-17T12:02:57.80-0500 [App/0] ERR from org/jruby/RubyKernel.java:1085:in `require'
2015-02-17T12:02:57.80-0500 [App/0] ERR from /home/vcap/app/vendor/bundle/jruby/1.9/gems/activerecord-oracle_enhanced-adapter-1.4.3/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:36:in `(root)'
2015-02-17T12:02:57.80-0500 [App/0] ERR from org/jruby/RubyArray.java:1613:in `each'
2015-02-17T12:02:57.80-0500 [App/0] ERR from /home/vcap/app/vendor/cache/pam_client-cf9763696377/lib/pam_client.rb:1:in `(root)'
2015-02-17T12:02:57.80-0500 [App/0] ERR from org/jruby/RubyArray.java:1613:in `each'
2015-02-17T12:02:57.80-0500 [App/0] ERR from /home/vcap/app/vendor/cache/pam_client-cf9763696377/lib/pam_client.rb:2:in `(root)'
2015-02-17T12:02:57.80-0500 [App/0] ERR from /home/vcap/app/vendor/bundle/jruby/1.9/gems/bundler-1.7.12/lib/bundler/runtime.rb:1:in `(root)'
2015-02-17T12:02:57.80-0500 [App/0] ERR from /home/vcap/app/vendor/bundle/jruby/1.9/gems/bundler-1.7.12/lib/bundler/runtime.rb:76:in `require'
2015-02-17T12:02:57.80-0500 [App/0] ERR from org/jruby/RubyKernel.java:1085:in `require'
2015-02-17T12:02:57.80-0500 [App/0] ERR from /home/vcap/app/vendor/bundle/jruby/1.9/gems/bundler-1.7.12/lib/bundler/runtime.rb:72:in `require'
2015-02-17T12:02:57.80-0500 [App/0] ERR from org/jruby/RubyKernel.java:1893:in `tap'
2015-02-17T12:02:57.80-0500 [App/0] ERR from /home/vcap/app/vendor/bundle/jruby/1.9/gems/bundler-1.7.12/lib/bundler/runtime.rb:61:in `require'
2015-02-17T12:02:57.80-0500 [App/0] ERR from org/jruby/RubyKernel.java:1085:in `require'
2015-02-17T12:02:57.80-0500 [App/0] ERR from script/rails:6:in `(root)'
2015-02-17T12:02:57.86-0500 [App/0] OUT
2015-02-17T12:02:57.93-0500 [DEA/12] ERR Instance (index 0) failed to start accepting connections
This is from a working 1.2.0 deployment
2015-02-17T11:59:21.78-0500 [STG/28] OUT -----> Downloaded app package (92M)
2015-02-17T11:59:23.45-0500 [STG/28] OUT -----> Downloaded app buildpack cache (65M)
2015-02-17T11:59:24.31-0500 [STG/0] ERR Cloning into '/tmp/buildpacks/ruby-buildpack'...
2015-02-17T11:59:25.21-0500 [STG/0] ERR Note: checking out '5e653b363f9848eb75c91a25e939f70a6e9fd046'.
2015-02-17T11:59:25.21-0500 [STG/0] ERR You are in 'detached HEAD' state. You can look around, make experimental
2015-02-17T11:59:25.21-0500 [STG/0] ERR changes and commit them, and you can discard any commits you make in this
2015-02-17T11:59:25.21-0500 [STG/0] ERR state without impacting any branches by performing another checkout.
2015-02-17T11:59:25.21-0500 [STG/0] ERR If you want to create a new branch to retain commits you create, you may
2015-02-17T11:59:25.21-0500 [STG/0] ERR do so (now or later) by using -b with the checkout command again. Example:
2015-02-17T11:59:25.21-0500 [STG/0] ERR git checkout -b new_branch_name
2015-02-17T11:59:25.41-0500 [STG/0] OUT Submodule 'compile-extensions' (https://github.com/cf-buildpacks/compile-extensions) registered for path 'compile-extensions'
2015-02-17T11:59:25.46-0500 [STG/0] ERR Cloning into 'compile-extensions'...
2015-02-17T11:59:25.74-0500 [STG/0] OUT Submodule path 'compile-extensions': checked out '6f91ed772234bfa0433f467d41e86c8e712466b6'
2015-02-17T11:59:25.89-0500 [STG/0] OUT -------> Buildpack version 1.2.0
2015-02-17T11:59:26.78-0500 [STG/0] OUT -----> Compiling Ruby/Rails
2015-02-17T11:59:28.48-0500 [STG/0] OUT -----> Using Ruby version: ruby-1.9.3-jruby-1.7.11
2015-02-17T11:59:28.48-0500 [STG/0] OUT -----> Installing JVM: openjdk7-latest
2015-02-17T11:59:30.75-0500 [STG/0] ERR Picked up JAVA_TOOL_OPTIONS: -Djava.rmi.server.useCodebaseOnly=true
2015-02-17T11:59:32.99-0500 [STG/0] OUT -----> Installing dependencies using 1.6.3
it would seem that the most salient differences are:
1.2.1
JAVA_TOOL_OPTIONS: -Xmx768m -Djava.rmi.server.useCodebaseOnly=true
1.2.0
JAVA_TOOL_OPTIONS: -Djava.rmi.server.useCodebaseOnly=true
FWIW it seems that the /lib/
directory is automatically included in the CLASSPATH
somehow during bundling for the 1.2.0 version of the buildpack.
bash
$ ls -a lib/*.jar
lib/log4j-1.2.17.jar lib/ojdbc6.jar lib/ojdbc7.jar
Currently, the only way to know supported ruby, rails version is to check the build pack source code. Better to have these information documented in docs.
Today we have experienced the issue described below while running "bosh create release" against a modified version of cf-release v172:
`buildpack_ruby' pre-packaging failed > + set -e -x
> + cd /tmp/d20140718-13028-3staau/d20140718-13028-4er7u7/buildpacks/ruby
> + git --git-dir /home/tamac/cf-release/src/buildpacks/ruby/.git describe --tags
> fatal: No tags can describe '2fc4ad8b6bdea30eb18fdd65207637f02da3e130'.
> Try --always, or create some tags.
I guess this may be caused by the recent deletion of tags at ruby-buildpack.
Is it able to resurrect the tags deleted?
Replacing database.yml is not really necessary because now you can't specify the schema you want to use. For example if you want to use blue/green zero downtime deployment with database supporting multiple schemas, then it's not even possible. When you deploy blue it's using schema 'user1' and deploying green makes it use another schema 'user2' so you would need to move all data between schemas.
Heroku already removed this function here and here.
Can you also implement this functionality?
Trying to use buildpack v1.4.2 and logs show that getting bundler from s3 fails.
Cloning into 'compile-extensions'...
Submodule path 'compile-extensions': checked out '4d1038d2d7b23ec303491db4fba80faf8651a90d'
-------> Buildpack version 1.4.2
!
! Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 10 --max-time 90 https://pivotal-buildpacks.s3.amazonaws.com/ruby/binaries/shared/bundler-1.9.7.tgz -s -o - | tar zxf - ' failed unexpectedly:
!
! gzip: stdin: unexpected end of file
! tar: Child returned status 1
! tar: Exiting with failure status due to previous errors
!
/tmp/buildpacks/ruby-buildpack/lib/language_pack/shell_helpers.rb:50:in `run!': Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 10 --max-time 90 https://pivotal-buildpacks.s3.amazonaws.com/ruby/binaries/shared/bundler-1.9.7.tgz -s -o - | tar zxf - ' failed unexpectedly: (LanguagePack::Fetcher::FetchError)
gzip: stdin: unexpected end of file
tar: Child returned status 1
Our network admins state that amazon S3 is resetting TCP connections and that seems to be why curl is failing.
Testing gitbot
I deployed a CF on a PC with cf_nise_installer, and push a sample app that comes from "https://github.com/yudai/cf_nise_installer/tree/master/test_app".
When starting the app, there is a error as following.
Starting app hello in org DevBox / space sp1 as admin...
-----> Downloaded app package (1.4M)
-------> Buildpack version 1.6.7
-----> Compiling Ruby/Rack
-----> Using Ruby version: ruby-2.2.3
-----> Installing dependencies using 1.9.7
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Fetching source index from http://rubygems.org/
Retrying source fetch due to error (2/3): Bundler::HTTPError Could not fetch specs from http://rubygems.org/
Retrying source fetch due to error (3/3): Bundler::HTTPError Could not fetch specs from http://rubygems.org/
Could not fetch specs from http://rubygems.org/
Bundler Output: Fetching source index from http://rubygems.org/
Retrying source fetch due to error (2/3): Bundler::HTTPError Could not fetch specs from http://rubygems.org/
Retrying source fetch due to error (3/3): Bundler::HTTPError Could not fetch specs from http://rubygems.org/
Could not fetch specs from http://rubygems.org/
!
! Failed to install gems via Bundler.
!
Staging failed: Buildpack compilation step failed
If run the "bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment" on the PC that is the host of the CF, it's OK.
So, it seems that the proxy that setted on the host doesn't work on the ruby-buildpack.
If it was right , cloud you tell me how to set up the proxy on the ruby-buildpack?
Is it possible to rebuild the buildpack so the default location to install ruby gems from is not rubygems.org. At my company we do not have internet access for installing gems when deploying apps. I know it is possible to use a cached version of the buildpack and have the app vendor its dependencies, but we have an internal mirror of rubygems.org. Is there a setting that can be changed to allow for this mirror to be used instead?
According to Ruby buildpack source, it sets $HOME/ld_library_path
as its default LD_LIBRARY_PATH.
def setup_profiled
original_setup_profiled
set_env_default "LD_LIBRARY_PATH", "$HOME/ld_library_path"
end
And app/ld_library_path/libreadline.so.5
is symlink to /usr/lib/libreadline.so
code
mkdir -p #{ARGV[0]}/ld_library_path
ln -s /usr/lib/libreadline.so #{ARGV[0]}/ld_library_path/libreadline.so.5
However as confirmed, libreadline.so
doesn't exist under /usr/lib/
in cflinuxfs2 stack,
lucid64: /usr/lib/libreadline.so
cflinuxfs2: /usr/lib/x86_64-linux-gnu/libreadline.so
Those Ruby apps which has dependency on libreadline.so
won't work with cflinuxfs2 stack.
When pushing a Ruby app that specifies a command
in the manifest.yml like this:
command: bundle exec rake db:migrate && bundle exec rails s thin -p $PORT
I see this warning:
###### WARNING:
No Procfile detected, using the default web server (webrick)
But then later, I see
2016-02-05T12:27:15.26-0800 [CELL/0] OUT Starting health monitoring of container
2016-02-05T12:27:20.33-0800 [APP/0] OUT => Booting Thin
2016-02-05T12:27:20.33-0800 [APP/0] OUT => Rails 4.2.5.1 application starting in production on http://0.0.0.0:8080
2016-02-05T12:27:20.33-0800 [APP/0] OUT => Run `rails server -h` for more startup options
2016-02-05T12:27:20.33-0800 [APP/0] OUT => Ctrl-C to shutdown server
So clearly CF is using Thin, presumably because it's in the command. It's not using Webrick, so the Procfile warning isn't accurate, at least on PWS.
Any plans to update default runtime version of Ruby to a later stable version (2.1.5 or 2.2.1)?
https://github.com/cloudfoundry/ruby-buildpack/blob/master/lib/language_pack/ruby.rb#L19
In my RoR projects, I define the Ruby version in my Gemfile like so:
source 'https://rubygems.org'
ruby File.read('.ruby-version').strip
...
so that the Ruby version is synchronized with with rbenv (which I use in local development). When I try to deploy my application using using cloudfoundry/ruby-buildpack
(PWS/v1.6.19), the buildpack cannot parse the Gemfile and fails (log included below).
I'd expect cloudfoundry/ruby-buildpack
to configure the Ruby version just as if I had written it like so:
source 'https://rubygems.org'
ruby '2.3.1'
...
FWIW, my Gemfile works fine locally and using heroku/heroku-buildpack-ruby
on Heroku.
Log:
Staging...
-------> Buildpack version 1.6.19
Downloaded [file:///tmp/buildpacks/fda2b356ce7de642197a27faa3892370/dependencies/https___pivotal-buildpacks.s3.amazonaws.com_concourse-binaries_bundler_bundler-1.12.5.tgz]
-----> Compiling Ruby/Rails
sh: 1: Syntax error: EOF in backquote substitution
./Gemfile:2:in `ruby_requirement': undefined method `read' for nil:NilClass (NoMethodError)
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/ruby_semver_version.rb:32:in `instance_eval'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/ruby_semver_version.rb:32:in `ruby_requirement'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/ruby_semver_version.rb:7:in `initialize'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/ruby_version.rb:126:in `new'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/ruby_version.rb:38:in `initialize'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/ruby_version.rb:126:in `update_version'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/ruby.rb:187:in `block in ruby_version'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:17:in `block in instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:16:in `instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/base.rb:48:in `instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/ruby.rb:180:in `ruby_version'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/ruby.rb:331:in `block in install_ruby'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/base.rb:44:in `instrument'
from /usr/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/base.rb:48:in `instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
from /usr/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:16:in `instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/base.rb:48:in `instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/ruby.rb:187:in `new'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:16:in `instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/base.rb:48:in `instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/ruby.rb:330:in `install_ruby'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/ruby.rb:93:in `block in compile'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:17:in `block in instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/ruby.rb:88:in `compile'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/rails2.rb:49:in `block in compile'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/base.rb:44:in `instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/rails3.rb:38:in `block in compile'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:17:in `block in instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/base.rb:44:in `instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:16:in `instrument'
from /usr/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/base.rb:44:in `instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:17:in `block in instrument'
from /usr/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:16:in `instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:17:in `block in instrument'
from /usr/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:16:in `instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/rails3.rb:37:in `compile'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/rails4.rb:41:in `block in compile'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/base.rb:48:in `instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/rails4.rb:40:in `compile'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/bin/compile:23:in `block (2 levels) in <main>'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/base.rb:129:in `log'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/bin/compile:22:in `block in <main>'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:35:in `block in trace'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:17:in `block in instrument'
from /usr/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:35:in `trace'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/bin/compile:18:in `<main>'
! undefined method `read' for nil:NilClass
!
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/base.rb:44:in `instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/rails2.rb:47:in `compile'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/base.rb:48:in `instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:17:in `block in instrument'
from /usr/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/base.rb:44:in `instrument'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:35:in `call'
from /tmp/buildpacks/fda2b356ce7de642197a27faa3892370/lib/language_pack/instrument.rb:16:in `instrument'
!
Failed to compile droplet
Exit status 223
Staging failed: Exited with status 223
FAILED
Error restarting application: BuildpackCompileFailed
Hi,
The Ruby buildpack currently provides users access to Node by packaging it with Ruby apps pushed on Cloud Foundry. As discussed in the related issue for the Node.js buildpack, since April 2016 [1] Node.js v0.12 will only be supported in a maintenance capacity.
To provide users with a longer active LTS schedule, we are proposing to change the Node version in the Ruby buildpack from v0.12 to v4.
We are planning to move forward on this issue by 4/25/2016. If you have any concerns or feedback please comment on this issue.
[1] - https://raw.githubusercontent.com/nodejs/LTS/master/schedule.png
Hello there,
The current version of bundler shipping with the cloudfoundry ruby-buildpack is 1.9.7 (from what I can see in the manifest.yml)
I wonder if bundler could be updated to the latest non-pre-release, 1.11.2 (https://github.com/bundler/bundler/blob/master/CHANGELOG.md)
That would be awesome.
Thanks!
What version of Cloud Foundry are you using?
v230
What version of the buildpack you are using?
1.6.28
If you were attempting to accomplish a task, what was it you were attempting to do?
Push an ruby app which uses "ruby-oci8" gem
What did you expect to happen?
Since the installation of ruby-oci8
requires LD_LIBRARY_PATH
and PATH
pointing to Oracle Instance Client diretory.
I expect there is a easy way to set user provided environment variables during staging phase in manifest, so that bundle can detect and use them.
What was the actual behavior?
$ cat Gemfile
source 'https://rubygems.org'
gem 'sinatra'
gem 'puma'
gem 'ruby-oci8'
# Oracle client, Need to include this to LD_LIBRARY_PATH and PATH during staging
# Download from http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
# Require Basic.zip and SDK.zip
$ ls instantclient_12_1/
adrci genezi libclntsh.so libipc1.so libnnz12.so libocci.so.12.1 libocijdbc12.so liboramysql12.so ojdbc7.jar uidrvci
BASIC_README libclntshcore.so.12.1 libclntsh.so.12.1 libmql1.so libocci.so libociei.so libons.so ojdbc6.jar sdk xstreams.jar
$ bundle package --all
Using puma 3.6.0
Using rack 1.6.5
Using ruby-oci8 2.2.2
Using tilt 2.0.5
Using bundler 1.13.6
Using rack-protection 1.5.3
Using sinatra 1.4.7
Updating files in vendor/cache
Bundle complete! 3 Gemfile dependencies, 7 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
Updating files in vendor/cache
$ cf push
......
-----> Downloaded app package (79M)
-----> Downloaded app buildpack cache (2.0M)
Cloning into '/tmp/buildpacks/ruby-buildpack'...
Submodule 'compile-extensions' (https://github.com/rakutentech/compile-extensions) registered for path 'compile-extensions'
Cloning into 'compile-extensions'...
Submodule path 'compile-extensions': checked out '7985e1c153d80ca9563a289b8026f0acb45e03d2'
-------> Buildpack version 1.6.28
Downloaded [https://buildpacks.cloudfoundry.org/concourse-binaries/bundler/bundler-1.13.6.tgz]
-----> Compiling Ruby/Rack
Downloaded [https://buildpacks.cloudfoundry.org/concourse-binaries/ruby/ruby-2.3.1-linux-x64.tgz]
-----> Using Ruby version: ruby-2.3.1
###### WARNING:
You have the `.bundle/config` file checked into your repository
It contains local state like the location of the installed bundle
as well as configured git local gems, and other settings that should
not be shared between multiple checkouts of a single repo. Please
remove the `.bundle/` folder from your repo and add it to your `.gitignore` file.
-----> Installing dependencies using bundler 1.13.6
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Using puma 3.6.0
Using rack 1.6.5
Installing ruby-oci8 2.2.2 with native extensions
Using tilt 2.0.5
Using bundler 1.13.6
Using rack-protection 1.5.3
Using sinatra 1.4.7
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2/ext/oci8
/tmp/staged/app/vendor/ruby-2.3.1/bin/ruby -r ./siteconf20161111-295-r4jh0h.rb
extconf.rb
checking for load library path...
LD_LIBRARY_PATH...
checking /home/vcap/app/instantclient_12_1... no
checking ld.so.conf... no
checking for cc... ok
checking for gcc... yes
checking for LP64... yes
checking for sys/types.h... yes
checking for ruby header... ok
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/tmp/staged/app/vendor/ruby-2.3.1/bin/$(RUBY_BASE_NAME)
--with-instant-client
--without-instant-client
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:963:in
`get_home': RuntimeError (RuntimeError)
from
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:779:in
`initialize'
from
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:320:in
`new'
from
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:320:in
`get'
Error Message:
from extconf.rb:22:in `<main>'
---------------------------------------------------
Set the environment variable ORACLE_HOME if Oracle Full Client.
Append the path of Oracle client libraries to LD_LIBRARY_PATH if Oracle
Instant Client.
Backtrace:
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:963:in
`get_home'
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:779:in
`initialize'
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:320:in
`new'
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:320:in
`get'
extconf.rb:22:in `<main>'
---------------------------------------------------
See:
*
http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/install-full-client.md
for Oracle full client
*
http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/install-instant-client.md
for Oracle instant client
* http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/install-on-osx.md for
OS X
*
http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/report-installation-issue.md
to report an issue.
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/tmp/staged/app/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/ruby-oci8-2.2.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2 for inspection.
Results logged to
/tmp/staged/app/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/ruby-oci8-2.2.2/gem_make.out
An error occurred while installing ruby-oci8 (2.2.2), and Bundler cannot
continue.
Make sure that `gem install ruby-oci8 -v '2.2.2'` succeeds before bundling.
Bundler Output: Using puma 3.6.0
Using rack 1.6.5
Installing ruby-oci8 2.2.2 with native extensions
Using tilt 2.0.5
Using bundler 1.13.6
Using rack-protection 1.5.3
Using sinatra 1.4.7
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2/ext/oci8
/tmp/staged/app/vendor/ruby-2.3.1/bin/ruby -r ./siteconf20161111-295-r4jh0h.rb
extconf.rb
checking for load library path...
LD_LIBRARY_PATH...
checking /home/vcap/app/instantclient_12_1... no
checking ld.so.conf... no
checking for cc... ok
checking for gcc... yes
checking for LP64... yes
checking for sys/types.h... yes
checking for ruby header... ok
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/tmp/staged/app/vendor/ruby-2.3.1/bin/$(RUBY_BASE_NAME)
--with-instant-client
--without-instant-client
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:963:in
`get_home': RuntimeError (RuntimeError)
from
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:779:in
`initialize'
from
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:320:in
`new'
from
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:320:in
`get'
from extconf.rb:22:in `<main>'
---------------------------------------------------
Error Message:
Set the environment variable ORACLE_HOME if Oracle Full Client.
Append the path of Oracle client libraries to LD_LIBRARY_PATH if Oracle
Instant Client.
Backtrace:
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:963:in
`get_home'
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:779:in
`initialize'
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:320:in
`new'
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:320:in
`get'
extconf.rb:22:in `<main>'
---------------------------------------------------
See:
*
http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/install-full-client.md
for Oracle full client
*
http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/install-instant-client.md
for Oracle instant client
* http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/install-on-osx.md for
OS X
*
http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/report-installation-issue.md
to report an issue.
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/tmp/staged/app/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/ruby-oci8-2.2.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/tmp/staged/app/vendor/bundle/ruby/2.3.0/gems/ruby-oci8-2.2.2 for inspection.
Results logged to
/tmp/staged/app/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/ruby-oci8-2.2.2/gem_make.out
An error occurred while installing ruby-oci8 (2.2.2), and Bundler cannot
continue.
Make sure that `gem install ruby-oci8 -v '2.2.2'` succeeds before bundling.
!
! Failed to install gems via Bundler.
!
Staging failed: Buildpack compilation step failed
Please confirm where necessary:
Hello,
Since yesterday I have detected that application can not be pushed anymore using this buildpack. Here is error received:
2015-08-23T11:18:43.37+0200 [STG/0] ERR Cloning into '/tmp/buildpacks/ruby-buildpack'...
2015-08-23T11:18:47.71+0200 [STG/0] OUT Submodule 'compile-extensions' (https://github.com/cloudfoundry/compile-extensions) registered for path 'compile-extensions'
2015-08-23T11:18:47.78+0200 [STG/0] ERR Cloning into 'compile-extensions'...
2015-08-23T11:18:49.44+0200 [STG/0] OUT Submodule path 'compile-extensions': checked out '450ef697e1ea234add05121fbeb5d05b056133c6'
2015-08-23T11:18:49.70+0200 [STG/0] OUT -------> Buildpack version 1.6.5
2015-08-23T11:18:56.25+0200 [STG/0] OUT -----> Compiling Ruby/Rails
2015-08-23T11:18:56.56+0200 [STG/0] OUT Could not get translated url, exited with: DEPENDENCY_MISSING_IN_MANIFEST: https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/ruby-2.1.5.tgz
2015-08-23T11:18:56.56+0200 [STG/0] OUT !
2015-08-23T11:18:56.56+0200 [STG/0] OUT ! exit
2015-08-23T11:18:56.56+0200 [STG/0] OUT !
2015-08-23T11:18:56.58+0200 [STG/0] OUT Staging failed: Buildpack compilation step failed
2015-08-23T11:18:56.77+0200 [API/9] ERR encountered error: App staging failed in the buildpack compile phase
And in fact URL https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/ruby-2.1.5.tgz - return AccessDenided
How it could be bypassed?
Regards,
Roman
Our app needs to use different gems in different environments. Our gems need to be vendored so we can install them without internet, but since there is no way to package subsets of gems in a Gemfile (see rubygems/bundler#2595), we need to be able to switch between Gemfiles at deploy time. Bundler respects the BUNDLE_GEMFILE environment variable which can be set before using cf push
to specify which Gemfile to use. However, this ruby buildpack explicitly overrides that variable (see https://github.com/cloudfoundry/cf-buildpack-ruby/blob/master/lib/language_pack/helpers/bundler_wrapper.rb#L27).
There is a closed pull request (#5) which tried to solve this issue, but the code is out of date.
Sometimes the rubygems (or whatever gem server) craps out which breaks a deployment.
Having a --retry 3 works around this as a problem. (We're also vendoring gem, but I believe bundler may still reach back out to the dependency API in some circumstances.)
--retry shows up post v1.5 according to the doco on bundler.io
Every time I push a ruby based app I get the following warning which points to Heroku docs. Do we not have our own set of docs which explain the warning?
###### WARNING:
No Procfile detected, using the default web server (webrick)
https://devcenter.heroku.com/articles/ruby-default-web-server
ignore this
We're seeing some warning output about already initialized constant DEPENDENCIES_PATH
during staging of ruby apps (the ERR lines from the cf logs
output below):
2014-08-01T16:09:15.95-0700 [DEA] OUT Got staging request for app with id 7b6efb2f-9f97-4cd6-a408-e718df9f55af
2014-08-01T16:09:17.48-0700 [API] OUT Updated app with guid 7b6efb2f-9f97-4cd6-a408-e718df9f55af ({"state"=>"STARTED"})
2014-08-01T16:09:17.64-0700 [STG] OUT -----> Downloaded app package (12K)
2014-08-01T16:09:18.40-0700 [STG] ERR /var/vcap/data/dea_next/admin_buildpacks/1a6d06b8-9afe-4f5a-87da-51814a02f0f5_bf9c9b39e7d8160d0864d003bc218407a19a3231/lib/cloud_foundry/language_pack/fetcher.rb:1: warning: already initialized constant DEPENDENCIES_PATH
2014-08-01T16:09:18.40-0700 [STG] ERR /var/vcap/data/dea_next/admin_buildpacks/1a6d06b8-9afe-4f5a-87da-51814a02f0f5_bf9c9b39e7d8160d0864d003bc218407a19a3231/lib/cloud_foundry/language_pack/helpers/plugins_installer.rb:1: warning: already initialized constant DEPENDENCIES_PATH
2014-08-01T16:09:18.80-0700 [STG] OUT -----> Compiling Ruby/Rack
2014-08-01T16:09:19.93-0700 [STG] OUT -----> Using Ruby version: ruby-2.0.0
2014-08-01T16:09:20.09-0700 [STG] OUT -----> Installing dependencies using 1.5.2
2014-08-01T16:09:20.44-0700 [STG] OUT Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
This is happening when we stage dora from the CATs, for example.
Thanks,
Eric
Rubinius 2 has finally come out. http://rubini.us/2013/10/04/rubinius-2-0-released/
When I try to enable it in my Gemfile:
ruby "2.1.0", :engine => "rbx", :engine_version => "2.0.0"
And deploy, I get the following error:
Preparing to start env... OK
-----> Downloaded app package (60K)
!
! Invalid RUBY_VERSION specified: ruby-2.1.0-rbx-2.0.0
! Valid versions: ruby-1.9.3, ruby-1.9.2, ruby-1.8.7, ruby-2.0.0
!
/var/vcap/packages/dea_next/buildpacks/lib/installer.rb:16:in `compile': Buildpack compilation step failed: (RuntimeError)
Hey guys, had this occur today:
Tue Jul 14 2015 20:25:36 GMT-0600 (MDT) [STG] OUT Bundle complete! 6 Gemfile dependencies, 44 gems now installed.��
Tue Jul 14 2015 20:25:36 GMT-0600 (MDT) [STG] OUT Gems in the groups development and test were not installed.��
Tue Jul 14 2015 20:25:36 GMT-0600 (MDT) [STG] OUT Bundled gems are installed into ./vendor/bundle.��
Tue Jul 14 2015 20:25:36 GMT-0600 (MDT) [STG] OUT Bundle completed (0.39s)��
Tue Jul 14 2015 20:25:36 GMT-0600 (MDT) [STG] OUT Cleaning up the bundler cache.��
Tue Jul 14 2015 20:27:08 GMT-0600 (MDT) [STG] OUT ! ��
Tue Jul 14 2015 20:27:08 GMT-0600 (MDT) [STG] OUT ! gzip: stdin: invalid compressed data--format violated��
Tue Jul 14 2015 20:27:08 GMT-0600 (MDT) [STG] OUT !��
Tue Jul 14 2015 20:27:08 GMT-0600 (MDT) [STG] OUT ! Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 10 --max-time 90 https://pivotal-buildpacks.s3.amazonaws.com/node/binaries/node-v0.12.7-linux-x64.tar.gz -s -o - | tar zxf - node-v0.12.7-linux-x64/bin/node' failed unexpectedly:���
Tue Jul 14 2015 20:27:08 GMT-0600 (MDT) [STG] OUT !��
Tue Jul 14 2015 20:27:08 GMT-0600 (MDT) [STG] OUT ! tar: Unexpected EOF in archive��
Tue Jul 14 2015 20:27:08 GMT-0600 (MDT) [STG] OUT ! tar: Error is not recoverable: exiting now��
Tue Jul 14 2015 20:27:08 GMT-0600 (MDT) [STG] ERR /tmp/buildpacks/ruby-buildpack/lib/language_pack/shell_helpers.rb:50:in `run!': Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 10 --max-time 90 https://pivotal-buildpacks.s3.amazonaws.com/node/binaries/node-v0.12.7-linux-x64.tar.gz -s -o - | tar zxf - node-v0.12.7-linux-x64/bin/node' failed unexpectedly: (LanguagePack::Fetcher::FetchError)���
Tue Jul 14 2015 20:27:08 GMT-0600 (MDT) [STG] ERR gzip: stdin: invalid compressed data--format violated��
Tue Jul 14 2015 20:27:08 GMT-0600 (MDT) [STG] ERR tar: Unexpected EOF in archive��
....
Tue Jul 14 2015 20:27:08 GMT-0600 (MDT) [STG] OUT Staging failed: Buildpack compilation step failed��
Tue Jul 14 2015 20:27:09 GMT-0600 (MDT) [API] ERR encountered error: App staging failed in the buildpack compile phase��
It seems to have only occurred once.
Not found the buildpack-build
file, how to run the tests?
root@buildpack:~/workspace/nodejs-buildpack# `BUNDLE_GEMFILE=cf.Gemfile bundle show machete`/scripts/buildpack-build online
-bash: /root/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/bundler/gems/machete-4f2ac6817b92/scripts/buildpack-build: No such file or directory
see #2
The latest buildpack version includes v0.1.6 of libyaml, but the latest version[1] is v0.1.7
The version 0.1.6 is also affected by a known vulnerability [2]
[1] http://pyyaml.org/wiki
[2] https://www.cvedetails.com/cve/CVE-2014-9130/
What version of Cloud Foundry are you using?
API version: 2.59.0
What version of the buildpack you are using?
ruby_buildpack-cached-v1.6.21.zip
If you were attempting to accomplish a task, what was it you were attempting to do?
Override the default ActiveRecord connection pool size 5 with higher value 15
What did you expect to happen?
ActiveRecord connection pool size should be set to 15 successfully
What was the actual behavior?
ActiveRecord connection pool size is still 5
Please confirm where necessary:
This issue can be reproduced with cloud foundry sample pong_matcher_rails
ActiveRecord connection pool size is set to 15 in config/database.yml.
Daivd-Office-Mac:pong_matcher_rails-master ubuntu$ more config/database.yml
default: &default
adapter: mysql2
encoding: utf8
pool: 15
username: root
password:
port: 3306
host: localhost
development:
<<: *default
database: pong_matcher_rails_development
test:
<<: *default
database: pong_matcher_rails_test
Daivd-Office-Mac:pong_matcher_rails-master ubuntu$
Cf push run successfully.
Daivd-Office-Mac:pong_matcher_rails-master ubuntu$ cf push -n mysubdomain-david
Using manifest file /Users/david/Downloads/pong_matcher_rails-master/manifest.yml
Updating app railspong in org gss-apj / space David as [email protected]...
OK
Using route mysubdomain-david.cfapps.io
Uploading railspong...
Uploading app files from: /Users/david/Downloads/pong_matcher_rails-master
Uploading 45K, 102 files
Done uploading
OK
Binding service mysql to app railspong in org gss-apj / space David as [email protected]...
OK
Stopping app railspong in org gss-apj / space David as [email protected]...
OK
Starting app railspong in org gss-apj / space David as [email protected]...
Downloading binary_buildpack...
Downloading nodejs_buildpack...
Downloading java_buildpack...
Downloading staticfile_buildpack...
Downloading ruby_buildpack...
Downloaded java_buildpack
Downloaded staticfile_buildpack
Downloading go_buildpack...
Downloading python_buildpack...
Downloaded nodejs_buildpack
Downloading php_buildpack...
Downloaded binary_buildpack
Downloading liberty_buildpack...
Downloaded ruby_buildpack
Downloaded python_buildpack
Downloaded go_buildpack
Downloaded liberty_buildpack
Downloaded php_buildpack
Creating container
Successfully created container
Downloading app package...
Downloaded app package (27.5K)
Downloading build artifacts cache...
Downloaded build artifacts cache (12.8M)
Staging...
-------> Buildpack version 1.6.21
Downloaded [file:///tmp/buildpacks/52950f43493e01421589bf265ae8c07e/dependencies/https___buildpacks.cloudfoundry.org_concourse-binaries_bundler_bundler-1.12.5.tgz]
-----> Compiling Ruby/Rails
Downloaded [file:///tmp/buildpacks/52950f43493e01421589bf265ae8c07e/dependencies/https___buildpacks.cloudfoundry.org_concourse-binaries_ruby_ruby-2.3.1-linux-x64.tgz]
-----> Using Ruby version: ruby-2.3.1
-----> Installing dependencies using bundler 1.12.5
Downloaded [file:///tmp/buildpacks/52950f43493e01421589bf265ae8c07e/dependencies/https___buildpacks.cloudfoundry.org_ruby_binaries_cflinuxfs2_libyaml-0.1.6.tgz]
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Using i18n 0.7.0
Using rake 10.4.2
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 rack 1.5.5
Using mime-types 2.6.1
Using arel 5.0.1.20140414130214
Using kgio 2.9.3
Using mysql2 0.3.18
Using bundler 1.12.5
Using thor 0.19.1
Using rails_serve_static_assets 0.0.4
Using rails_stdout_logging 0.0.3
Using raindrops 0.14.0
Using tzinfo 1.2.2
Using mail 2.6.3
Using rack-test 0.6.3
Using sprockets 3.2.0
Using rails_12factor 0.0.3
Using activesupport 4.1.8
Using unicorn 4.9.0
Using actionview 4.1.8
Using activemodel 4.1.8
Using actionpack 4.1.8
Using activerecord 4.1.8
Using actionmailer 4.1.8
Using railties 4.1.8
Using sprockets-rails 2.3.2
Using rails 4.1.8
Bundle complete! 5 Gemfile dependencies, 32 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into ./vendor/bundle.
Bundle completed (0.35s)
Cleaning up the bundler cache.
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
Asset precompilation completed (1.19s)
Cleaning assets
Running: rake assets:clean
###### WARNING:
You have not declared a Ruby version in your Gemfile.
To set your Ruby version add this line to your Gemfile:
ruby '2.3.1'
# See https://devcenter.heroku.com/articles/ruby-versions for more information.
Exit status 0
Staging complete
Uploading droplet, build artifacts cache...
Uploading build artifacts cache...
Uploading droplet...
Uploaded build artifacts cache (12.8M)
Uploaded droplet (24.5M)
Uploading complete
Destroying container
Successfully destroyed container
1 of 1 instances running
App started
OK
App railspong was started using this command bin/rake cf:on_first_instance db:migrate && bundle exec unicorn -p $PORT -c ./config/unicorn.rb
Showing health and status for app railspong in org gss-apj / space David as [email protected]...
OK
requested state: started
instances: 1/1
usage: 256M x 1 instances
urls: mysubdomain-david.cfapps.io
last uploaded: Fri Aug 19 07:19:13 UTC 2016
stack: cflinuxfs2
buildpack: ruby 1.6.21
state since cpu memory disk details
#0 running 2016-08-19 03:19:53 PM 0.0% 65.1M of 256M 104.4M of 1G
However ActiveRecord connection pool size is still 5.
vcap@qtnnq0qgbuu:~$ rails c
Loading production environment (Rails 4.1.8)
irb(main):001:0> ActiveRecord::Base.connection_pool.instance_eval { @size }
=> 5
irb(main):002:0>
When pushing an app, staging fails on PWS when the buildpack tries to untar Ruby. We see the same behavior for 2.1.4 and 2.1.3 (haven't tried 2.1.2). Below is the output and corresponding logs:
Output from push:
|2.1.3| montgomery in ~/workspace/feedback
± ek+wr |master ✗| → cf push web
Using manifest file /Users/pivotal/workspace/feedback/manifest.yml
Updating app web in org Pivotal Feedback / space staging as [email protected]...
OK
Uploading web...
Uploading app files from: /Users/pivotal/workspace/feedback
Uploading 1.5M, 842 files
OK
Binding service redis to app web in org Pivotal Feedback / space staging as [email protected]...
OK
Stopping app web in org Pivotal Feedback / space staging as [email protected]...
OK
Starting app web in org Pivotal Feedback / space staging as [email protected]...
OK
-----> Downloaded app package (812K)
FAILED
Server error, status code: 400, error code: 170004, message: App staging failed in the buildpack compile phase
TIP: use 'cf logs web --recent' for more information
And logs:
± ek+wr |master ✗| → cf logs web --recent
Connected, dumping recent logs for app web in org Pivotal Feedback / space staging as [email protected]...
2014-12-04T09:48:51.48-0800 [API] OUT Tried to stop app that never received a start event
2014-12-04T09:48:51.50-0800 [API] OUT Updated app with guid 8ab75c22-5c8b-411a-94ed-a82a79999ba9 ({"state"=>"STOPPED"})
2014-12-04T09:48:51.56-0800 [App/0] OUT [37] - Gracefully shutting down workers...
2014-12-04T09:48:51.56-0800 [App/0] ERR
2014-12-04T09:48:51.57-0800 [App/1] ERR
2014-12-04T09:48:52.69-0800 [DEA] OUT Stopping app instance (index 0) with guid 8ab75c22-5c8b-411a-94ed-a82a79999ba9
2014-12-04T09:48:52.69-0800 [DEA] OUT Stopped app instance (index 0) with guid 8ab75c22-5c8b-411a-94ed-a82a79999ba9
2014-12-04T09:48:52.69-0800 [DEA] OUT Stopping app instance (index 1) with guid 8ab75c22-5c8b-411a-94ed-a82a79999ba9
2014-12-04T09:48:52.69-0800 [DEA] OUT Stopped app instance (index 1) with guid 8ab75c22-5c8b-411a-94ed-a82a79999ba9
2014-12-04T09:48:55.13-0800 [API] OUT Updated app with guid 8ab75c22-5c8b-411a-94ed-a82a79999ba9 ({"name"=>"web", "command"=>"PRIVATE DATA HIDDEN", "instances"=>2, "memory"=>2048, "environment_json"=>"PRIVATE DATA HIDDEN"})
2014-12-04T09:50:23.29-0800 [DEA] OUT Got staging request for app with id 8ab75c22-5c8b-411a-94ed-a82a79999ba9
2014-12-04T09:50:34.08-0800 [API] OUT Updated app with guid 8ab75c22-5c8b-411a-94ed-a82a79999ba9 ({"state"=>"STARTED"})
2014-12-04T09:50:39.40-0800 [STG] OUT -----> Downloaded app package (64M)
2014-12-04T09:50:41.59-0800 [STG] OUT -----> Downloaded app buildpack cache (58M)
2014-12-04T09:50:45.23-0800 [STG] ERR Cloning into '/tmp/buildpacks/ruby-buildpack'...
2014-12-04T09:50:46.28-0800 [STG] ERR Note: checking out 'b476e5a351b69e4c3acfeacdcddd6fc02de5358e'.
2014-12-04T09:50:46.28-0800 [STG] ERR You are in 'detached HEAD' state. You can look around, make experimental
2014-12-04T09:50:46.28-0800 [STG] ERR changes and commit them, and you can discard any commits you make in this
2014-12-04T09:50:46.28-0800 [STG] ERR state without impacting any branches by performing another checkout.
2014-12-04T09:50:46.28-0800 [STG] ERR If you want to create a new branch to retain commits you create, you may
2014-12-04T09:50:46.28-0800 [STG] ERR do so (now or later) by using -b with the checkout command again. Example:
2014-12-04T09:50:46.28-0800 [STG] ERR git checkout -b new_branch_name
2014-12-04T09:50:46.48-0800 [STG] OUT Submodule 'buildpack-packager' (https://github.com/cf-buildpacks/buildpack-packager.git) registered for path 'buildpack-packager'
2014-12-04T09:50:46.54-0800 [STG] ERR Cloning into 'buildpack-packager'...
2014-12-04T09:50:46.82-0800 [STG] OUT Submodule path 'buildpack-packager': checked out '87560fd0a76ccaaeb71232bf34dc616ea8876338'
2014-12-04T09:50:46.99-0800 [STG] OUT -------> Buildpack version 1.1.2
2014-12-04T09:50:47.30-0800 [STG] OUT -----> Compiling Ruby/Rails
2014-12-04T09:50:49.25-0800 [STG] OUT !
2014-12-04T09:50:49.25-0800 [STG] OUT ! Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 10 --max-time 90 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/ruby-2.1.4.tgz -s -o - | tar zxf - ' failed unexpectedly:
2014-12-04T09:50:49.25-0800 [STG] OUT !
2014-12-04T09:50:49.25-0800 [STG] OUT ! gzip: stdin: unexpected end of file
2014-12-04T09:50:49.25-0800 [STG] OUT ! tar: Child returned status 1
2014-12-04T09:50:49.25-0800 [STG] OUT ! tar: Exiting with failure status due to previous errors
2014-12-04T09:50:49.25-0800 [STG] OUT !
2014-12-04T09:50:49.27-0800 [STG] OUT Staging failed: Buildpack compilation step failed
2014-12-04T09:50:49.47-0800 [API] ERR Encountered error: App staging failed in the buildpack compile phase
2014-12-04T09:52:03.27-0800 [API] OUT Updated app with guid 8ab75c22-5c8b-411a-94ed-a82a79999ba9 ({"name"=>"web", "command"=>"PRIVATE DATA HIDDEN", "instances"=>2, "memory"=>2048, "environment_json"=>"PRIVATE DATA HIDDEN"})
2014-12-04T09:52:17.25-0800 [API] OUT Tried to stop app that never received a start event
2014-12-04T09:52:17.27-0800 [API] OUT Updated app with guid 8ab75c22-5c8b-411a-94ed-a82a79999ba9 ({"state"=>"STOPPED"})
2014-12-04T09:52:20.36-0800 [DEA] OUT Got staging request for app with id 8ab75c22-5c8b-411a-94ed-a82a79999ba9
2014-12-04T09:52:24.75-0800 [API] OUT Updated app with guid 8ab75c22-5c8b-411a-94ed-a82a79999ba9 ({"state"=>"STARTED"})
2014-12-04T09:52:25.04-0800 [STG] OUT -----> Downloaded app package (816K)
2014-12-04T09:52:27.29-0800 [STG] OUT -----> Downloaded app buildpack cache (58M)
2014-12-04T09:52:27.55-0800 [STG] ERR Cloning into '/tmp/buildpacks/ruby-buildpack'...
2014-12-04T09:52:28.54-0800 [STG] ERR Note: checking out 'b476e5a351b69e4c3acfeacdcddd6fc02de5358e'.
2014-12-04T09:52:28.54-0800 [STG] ERR You are in 'detached HEAD' state. You can look around, make experimental
2014-12-04T09:52:28.54-0800 [STG] ERR changes and commit them, and you can discard any commits you make in this
2014-12-04T09:52:28.54-0800 [STG] ERR state without impacting any branches by performing another checkout.
2014-12-04T09:52:28.54-0800 [STG] ERR If you want to create a new branch to retain commits you create, you may
2014-12-04T09:52:28.54-0800 [STG] ERR do so (now or later) by using -b with the checkout command again. Example:
2014-12-04T09:52:28.54-0800 [STG] ERR git checkout -b new_branch_name
2014-12-04T09:52:28.78-0800 [STG] OUT Submodule 'buildpack-packager' (https://github.com/cf-buildpacks/buildpack-packager.git) registered for path 'buildpack-packager'
2014-12-04T09:52:28.83-0800 [STG] ERR Cloning into 'buildpack-packager'...
2014-12-04T09:52:29.13-0800 [STG] OUT Submodule path 'buildpack-packager': checked out '87560fd0a76ccaaeb71232bf34dc616ea8876338'
2014-12-04T09:52:29.30-0800 [STG] OUT -------> Buildpack version 1.1.2
2014-12-04T09:52:29.57-0800 [STG] OUT -----> Compiling Ruby/Rails
2014-12-04T09:52:29.88-0800 [STG] OUT !
2014-12-04T09:52:29.88-0800 [STG] OUT ! Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 10 --max-time 90 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/ruby-2.1.4.tgz -s -o - | tar zxf - ' failed unexpectedly:
2014-12-04T09:52:29.88-0800 [STG] OUT !
2014-12-04T09:52:29.88-0800 [STG] OUT ! gzip: stdin: unexpected end of file
2014-12-04T09:52:29.88-0800 [STG] OUT ! tar: Child returned status 1
2014-12-04T09:52:29.88-0800 [STG] OUT ! tar: Exiting with failure status due to previous errors
2014-12-04T09:52:29.88-0800 [STG] OUT !
2014-12-04T09:52:29.90-0800 [STG] OUT Staging failed: Buildpack compilation step failed
2014-12-04T09:52:30.08-0800 [API] ERR Encountered error: App staging failed in the buildpack compile phase
2014-12-04T09:54:19.63-0800 [API] OUT Updated app with guid 8ab75c22-5c8b-411a-94ed-a82a79999ba9 ({"name"=>"web", "command"=>"PRIVATE DATA HIDDEN", "instances"=>2, "memory"=>2048, "environment_json"=>"PRIVATE DATA HIDDEN"})
2014-12-04T09:54:39.63-0800 [API] OUT Tried to stop app that never received a start event
2014-12-04T09:54:39.66-0800 [API] OUT Updated app with guid 8ab75c22-5c8b-411a-94ed-a82a79999ba9 ({"state"=>"STOPPED"})
2014-12-04T09:54:42.63-0800 [DEA] OUT Got staging request for app with id 8ab75c22-5c8b-411a-94ed-a82a79999ba9
2014-12-04T09:54:45.80-0800 [API] OUT Updated app with guid 8ab75c22-5c8b-411a-94ed-a82a79999ba9 ({"state"=>"STARTED"})
2014-12-04T09:54:46.05-0800 [STG] OUT -----> Downloaded app package (812K)
2014-12-04T09:54:48.33-0800 [STG] OUT -----> Downloaded app buildpack cache (58M)
2014-12-04T09:54:48.58-0800 [STG] ERR Cloning into '/tmp/buildpacks/ruby-buildpack'...
2014-12-04T09:54:49.56-0800 [STG] ERR Note: checking out 'b476e5a351b69e4c3acfeacdcddd6fc02de5358e'.
2014-12-04T09:54:49.57-0800 [STG] ERR You are in 'detached HEAD' state. You can look around, make experimental
2014-12-04T09:54:49.57-0800 [STG] ERR changes and commit them, and you can discard any commits you make in this
2014-12-04T09:54:49.57-0800 [STG] ERR state without impacting any branches by performing another checkout.
2014-12-04T09:54:49.57-0800 [STG] ERR If you want to create a new branch to retain commits you create, you may
2014-12-04T09:54:49.57-0800 [STG] ERR do so (now or later) by using -b with the checkout command again. Example:
2014-12-04T09:54:49.57-0800 [STG] ERR git checkout -b new_branch_name
2014-12-04T09:54:49.77-0800 [STG] OUT Submodule 'buildpack-packager' (https://github.com/cf-buildpacks/buildpack-packager.git) registered for path 'buildpack-packager'
2014-12-04T09:54:49.82-0800 [STG] ERR Cloning into 'buildpack-packager'...
2014-12-04T09:54:50.11-0800 [STG] OUT Submodule path 'buildpack-packager': checked out '87560fd0a76ccaaeb71232bf34dc616ea8876338'
2014-12-04T09:54:50.28-0800 [STG] OUT -------> Buildpack version 1.1.2
2014-12-04T09:54:50.55-0800 [STG] OUT -----> Compiling Ruby/Rails
2014-12-04T09:54:50.95-0800 [STG] OUT !
2014-12-04T09:54:50.96-0800 [STG] OUT ! Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 10 --max-time 90 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/ruby-2.1.3.tgz -s -o - | tar zxf - ' failed unexpectedly:
2014-12-04T09:54:50.96-0800 [STG] OUT !
2014-12-04T09:54:50.96-0800 [STG] OUT ! gzip: stdin: unexpected end of file
2014-12-04T09:54:50.96-0800 [STG] OUT ! tar: Child returned status 1
2014-12-04T09:54:50.96-0800 [STG] OUT ! tar: Exiting with failure status due to previous errors
2014-12-04T09:54:50.96-0800 [STG] OUT !
2014-12-04T09:54:50.97-0800 [STG] OUT Staging failed: Buildpack compilation step failed
2014-12-04T09:54:51.16-0800 [API] ERR Encountered error: App staging failed in the buildpack compile phase
We then tried curling the buildpack ourselves, and got a 403:
curl --fail --retry 3 --retry-delay 1 --connect-timeout 10 --max-time 90 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/ruby-2.1.3.tgz
curl: (22) The requested URL returned error: 403 Forbidden
What version of Cloud Foundry are you using?
v240
What version of the buildpack you are using?
1.6.22
If you were attempting to accomplish a task, what was it you were attempting to do?
Stage an app that has a Gemfile that references a gemspec.
Ex:
source 'https://rubygems.org'
ruby "2.2.3"
gem "cf-app-utils"
gem "sinatra"
gemspec path: "gems/hola"
What did you expect to happen?
App to stage successfully.
What was the actual behavior?
Fail.
Staging...
-------> Buildpack version 1.6.22
Downloaded [file:///tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/dependencies/https___buildpacks.cloudfoundry.org_concourse-binaries_bundler_bundler-1.12.5.tgz]
-----> Compiling Ruby/Rack
sh: 1: Gemfile: not found
!
!
! [!] There was an error parsing `Gemfile`: No such file or directory @ rb_sysopen - gems/hola/hola.gemspec. Bundler cannot continue.
!
! # from ./Gemfile:3
! # -------------------------------------------
! > gemspec path: "gems/hola"
! # -------------------------------------------
!
/tmp/d20160830-20-wxxt3t/bundler-1.12.5/gems/bundler-1.12.5/lib/bundler.rb:358:in `read': (Bundler::Dsl::DSLError)
[!] There was an error parsing `Gemfile`: No such file or directory @ rb_sysopen - gems/hola/hola.gemspec. Bundler cannot continue.
# from ./Gemfile:3
# -------------------------------------------
# gem "sinatra"
> gemspec path: "gems/hola"
# -------------------------------------------
from /tmp/d20160830-20-wxxt3t/bundler-1.12.5/gems/bundler-1.12.5/lib/bundler.rb:358:in `block in load_gemspec_uncached'
from /tmp/d20160830-20-wxxt3t/bundler-1.12.5/gems/bundler-1.12.5/lib/bundler/shared_helpers.rb:54:in `chdir'
from /tmp/d20160830-20-wxxt3t/bundler-1.12.5/gems/bundler-1.12.5/lib/bundler/shared_helpers.rb:54:in `block in chdir'
from /usr/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
from /tmp/d20160830-20-wxxt3t/bundler-1.12.5/gems/bundler-1.12.5/lib/bundler/shared_helpers.rb:53:in `chdir'
from /tmp/d20160830-20-wxxt3t/bundler-1.12.5/gems/bundler-1.12.5/lib/bundler.rb:347:in `load_gemspec'
from /tmp/d20160830-20-wxxt3t/bundler-1.12.5/gems/bundler-1.12.5/lib/bundler/dsl.rb:59:in `gemspec'
from ./Gemfile:3:in `eval_gemfile'
from /tmp/d20160830-20-wxxt3t/bundler-1.12.5/gems/bundler-1.12.5/lib/bundler/dsl.rb:39:in `instance_eval'
from /tmp/d20160830-20-wxxt3t/bundler-1.12.5/gems/bundler-1.12.5/lib/bundler/dsl.rb:39:in `eval_gemfile'
from /tmp/d20160830-20-wxxt3t/bundler-1.12.5/gems/bundler-1.12.5/lib/bundler/dsl.rb:11:in `evaluate'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/ruby_semver_version.rb:31:in `ruby_requirement'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/ruby_semver_version.rb:7:in `initialize'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/ruby_version.rb:126:in `new'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/ruby_version.rb:126:in `update_version'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/ruby_version.rb:38:in `initialize'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/ruby.rb:187:in `new'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/ruby.rb:187:in `block in ruby_version'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
from /usr/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/instrument.rb:16:in `instrument'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/base.rb:44:in `instrument'
! # gem "sinatra"
from /tmp/d20160830-20-wxxt3t/bundler-1.12.5/gems/bundler-1.12.5/lib/bundler.rb:358:in `read'
from /tmp/d20160830-20-wxxt3t/bundler-1.12.5/gems/bundler-1.12.5/lib/bundler.rb:357:in `load_gemspec_uncached'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/instrument.rb:17:in `block in instrument'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/base.rb:48:in `instrument'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/ruby.rb:180:in `ruby_version'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/ruby.rb:331:in `block in install_ruby'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/instrument.rb:17:in `block in instrument'
from /usr/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/instrument.rb:16:in `instrument'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/base.rb:48:in `instrument'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/base.rb:44:in `instrument'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/ruby.rb:330:in `install_ruby'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/ruby.rb:93:in `block in compile'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/instrument.rb:17:in `block in instrument'
from /usr/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/instrument.rb:16:in `instrument'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/base.rb:48:in `instrument'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/base.rb:44:in `instrument'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/ruby.rb:88:in `compile'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/bin/compile:23:in `block (2 levels) in <main>'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/base.rb:129:in `log'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/bin/compile:22:in `block in <main>'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/instrument.rb:35:in `call'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/instrument.rb:35:in `block in trace'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/instrument.rb:17:in `block in instrument'
from /usr/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/instrument.rb:16:in `instrument'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/lib/language_pack/instrument.rb:35:in `trace'
from /tmp/buildpacks/70f6243610cd596d314fe836e4c3e23b/bin/compile:18:in `<main>'
Failed to compile droplet
Exit status 223
Staging failed: Exited with status 223
To reproduce:
1.) Download attached sample app.
2.) Run cf push
.
3.) Staging will fail like what's listed above.
Please confirm where necessary:
I'm trying to push rails sample app (https://github.com/pivotal-cf-experimental/rails_sample_app) onto Pivotal Web Service.
+------------------------------------------+---------------+---------+-----------------------------------------+
| Name | OS | Version | CID |
+------------------------------------------+---------------+---------+-----------------------------------------+
| bosh-vsphere-esxi-ubuntu-trusty-go_agent | ubuntu-trusty | 3263.8* | sc-7114438a-d57c-4f1d-a7f8-daaacda997ef |
+------------------------------------------+---------------+---------+-----------------------------------------+
And got the following error :
Binding rails-sample-blowiest-peroxide.cfapps.io to rails-sample...
OK
Uploading rails-sample...
Uploading app files from: /Users/serengeti/code/cloudfoundry/rails_sample_app
Uploading 445.4K, 217 files
Done uploading
OK
Binding service rails-postgres to app rails-sample in org jessehu / space dev as [email protected]...
OK
Starting app rails-sample in org xxx / space dev as xxx ...
Downloading binary_buildpack...
Downloading nodejs_buildpack...
Downloading java_buildpack...
Downloading php_buildpack...
Downloading ruby_buildpack...
Downloaded php_buildpack
Downloading go_buildpack...
Downloaded binary_buildpack
Downloading python_buildpack...
Downloading dotnet_core_buildpack...
Downloaded nodejs_buildpack
Downloaded java_buildpack
Downloading dotnet_core_buildpack_beta...
Downloaded go_buildpack
Downloading staticfile_buildpack...
Downloaded python_buildpack
Downloaded dotnet_core_buildpack
Downloaded ruby_buildpack
Downloaded dotnet_core_buildpack_beta
Downloaded staticfile_buildpack
Creating container
Successfully created container
Downloading app package...
Downloaded app package (266.6K)
Staging...
-------> Buildpack version 1.6.27
Downloaded [file:///tmp/buildpacks/2d95feb0bf976d4256991966a619beb5/dependencies/https___buildpacks.cloudfoundry.org_concourse-binaries_bundler_bundler-1.13.5.tgz]
-----> Compiling Ruby/Rails
Downloaded [file:///tmp/buildpacks/2d95feb0bf976d4256991966a619beb5/dependencies/https___buildpacks.cloudfoundry.org_ruby_binaries_lucid64_rails_log_stdout.tgz]
Downloaded [file:///tmp/buildpacks/2d95feb0bf976d4256991966a619beb5/dependencies/https___buildpacks.cloudfoundry.org_ruby_binaries_lucid64_rails3_serve_static_assets.tgz]
Downloaded [file:///tmp/buildpacks/2d95feb0bf976d4256991966a619beb5/dependencies/https___buildpacks.cloudfoundry.org_concourse-binaries_ruby_ruby-2.3.1-linux-x64.tgz]
-----> Using Ruby version: ruby-2.3.1
-----> Installing dependencies using bundler 1.13.5
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Your Gemfile lists the gem rspec-rails (= 2.6.1) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of one of them later.
Fetching version metadata from http://rubygems.org/..
Fetching dependency metadata from http://rubygems.org/.
Fetching gem metadata from http://rubygems.org/...........
Installing abstract 1.0.0
Installing rake 0.9.2.2
Installing builder 2.1.2
Installing i18n 0.5.0
Installing rack 1.2.5
Installing mime-types 1.18
Installing polyglot 0.3.3
Installing arel 2.0.10
Installing tzinfo 0.3.32
Installing activesupport 3.0.12
Installing cf-runtime 0.2.0
Installing json 1.6.6 with native extensions
Installing gravatar_image_tag 1.0.0.pre2
Using bundler 1.13.5
Installing thor 0.14.6
Installing pg 0.15.1 with native extensions
Installing sqlite3 1.3.4 with native extensions
Installing will_paginate 3.0.pre2
Installing erubis 2.6.6
Installing rack-mount 0.6.14
Installing rack-test 0.5.7
Installing treetop 1.4.10
Installing activemodel 3.0.12
Installing cf-autoconfig 0.2.1
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/tmp/app/vendor/bundle/ruby/2.3.0/gems/json-1.6.6/ext/json/ext/generator
/tmp/app/vendor/ruby-2.3.1/bin/ruby -r ./siteconf20161117-156-vai5ly.rb
current directory:
/tmp/app/vendor/bundle/ruby/2.3.0/gems/json-1.6.6/ext/json/ext/generator
current directory:
make "DESTDIR="
compiling generator.c
../fbuffer/fbuffer.h:151:47: error: macro "rb_str_new" requires 2 arguments, but
extconf.rb
creating Makefile
make "DESTDIR=" clean
/tmp/app/vendor/bundle/ruby/2.3.0/gems/json-1.6.6/ext/json/ext/generator
In file included from generator.c:1:0:
../fbuffer/fbuffer.h: In function ‘fbuffer_to_s’:
only 1 given
VALUE result = rb_str_new(FBUFFER_PAIR(fb));
^
../fbuffer/fbuffer.h:151:20: warning: initialization makes integer from pointer
without a cast [enabled by default]
VALUE result = rb_str_new(FBUFFER_PAIR(fb));
^
In file included from generator.c:2:0:
generator.c: In function ‘cState_aref’:
generator.h:96:27: warning: variable ‘state’ set but not used
[-Wunused-but-set-variable]
JSON_Generator_State *state; \
^
generator.c:632:5: note: in expansion of macro ‘GET_STATE’
GET_STATE(self);
^
generator.c: In function ‘isArrayOrObject’:
generator.c:863:10: warning: unused variable ‘c’ [-Wunused-variable]
char c, *p = RSTRING_PTR(string), *q = p + string_len - 1;
^
make: *** [generator.o] Error 1
make failed, exit code 2
Gem files will remain installed in
/tmp/app/vendor/bundle/ruby/2.3.0/gems/json-1.6.6 for inspection.
Results logged to
/tmp/app/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/json-1.6.6/gem_make.out
An error occurred while installing json (1.6.6), and Bundler cannot continue.
Make sure that `gem install json -v '1.6.6'` succeeds before bundling.
Bundler Output: Your Gemfile lists the gem rspec-rails (= 2.6.1) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of one of them later.
Fetching gem metadata from http://rubygems.org/...........
Fetching version metadata from http://rubygems.org/..
Fetching dependency metadata from http://rubygems.org/.
Installing abstract 1.0.0
Installing rake 0.9.2.2
Installing builder 2.1.2
Installing i18n 0.5.0
Installing rack 1.2.5
Installing mime-types 1.18
Installing polyglot 0.3.3
Installing arel 2.0.10
Installing tzinfo 0.3.32
Installing activesupport 3.0.12
Installing cf-runtime 0.2.0
Installing json 1.6.6 with native extensions
Installing gravatar_image_tag 1.0.0.pre2
Using bundler 1.13.5
Installing thor 0.14.6
Installing pg 0.15.1 with native extensions
Installing sqlite3 1.3.4 with native extensions
Installing will_paginate 3.0.pre2
Installing erubis 2.6.6
Installing rack-mount 0.6.14
Installing rack-test 0.5.7
Installing treetop 1.4.10
Installing activemodel 3.0.12
Installing cf-autoconfig 0.2.1
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/tmp/app/vendor/bundle/ruby/2.3.0/gems/json-1.6.6/ext/json/ext/generator
/tmp/app/vendor/ruby-2.3.1/bin/ruby -r ./siteconf20161117-156-vai5ly.rb
extconf.rb
creating Makefile
current directory:
/tmp/app/vendor/bundle/ruby/2.3.0/gems/json-1.6.6/ext/json/ext/generator
make "DESTDIR=" clean
current directory:
/tmp/app/vendor/bundle/ruby/2.3.0/gems/json-1.6.6/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
In file included from generator.c:1:0:
../fbuffer/fbuffer.h: In function ‘fbuffer_to_s’:
../fbuffer/fbuffer.h:151:47: error: macro "rb_str_new" requires 2 arguments, but
only 1 given
VALUE result = rb_str_new(FBUFFER_PAIR(fb));
^
../fbuffer/fbuffer.h:151:20: warning: initialization makes integer from pointer
without a cast [enabled by default]
VALUE result = rb_str_new(FBUFFER_PAIR(fb));
^
In file included from generator.c:2:0:
generator.c: In function ‘cState_aref’:
generator.h:96:27: warning: variable ‘state’ set but not used
[-Wunused-but-set-variable]
JSON_Generator_State *state; \
^
generator.c:632:5: note: in expansion of macro ‘GET_STATE’
GET_STATE(self);
^
generator.c: In function ‘isArrayOrObject’:
generator.c:863:10: warning: unused variable ‘c’ [-Wunused-variable]
char c, *p = RSTRING_PTR(string), *q = p + string_len - 1;
^
make: *** [generator.o] Error 1
make failed, exit code 2
Gem files will remain installed in
/tmp/app/vendor/bundle/ruby/2.3.0/gems/json-1.6.6 for inspection.
Results logged to
/tmp/app/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/json-1.6.6/gem_make.out
An error occurred while installing json (1.6.6), and Bundler cannot continue.
Make sure that `gem install json -v '1.6.6'` succeeds before bundling.
!
! Failed to install gems via Bundler.
!
Failed to compile droplet
Exit status 223
Staging failed: Exited with status 223
Destroying container
Successfully destroyed container
FAILED
Error restarting application: BuildpackCompileFailed
Is there a way to support jq (kinda like the go-buildpack) in this ruby-buildpack? Because it'd be helpful to have it there so one could use the ruby-jq gem (which needs jq in order to compile).
The ruby-buildpack currently supplies version 1.7.12 of bundler. However the current version (as of today) is 1.10.5. The cloudfoundry ruby-buildpack should update to at least version 1.9.x.
It seems that some work was done earlier in the year to update to bundler 1.9. See:
https://www.pivotaltracker.com/n/projects/1042066/stories/90697228
At that time it was determined that the latest bundler supported upstream in the heroku buildpack was version 1.7.12. That's now changed, and Heroku supports 1.9.7. See:
https://devcenter.heroku.com/articles/ruby-support#libraries
What version of Cloud Foundry are you using?
{
"name": "vcap",
"build": "2222",
"version": 2,
"min_cli_version": "6.7.0",
"min_recommended_cli_version": "6.11.2",
"api_version": "2.25.0",
}
What version of the buildpack you are using? v1.6.18
If you were attempting to accomplish a task, what was it you were attempting to do?
Deploy a ruby worker app with a database configured
What did you expect to happen?
The application to be able to talk to the database via DATABASE_URL
What was the actual behavior?
The buildpack did not rebuild the database.yml file, hence there was no configuration to talk to the production database
I have these lines of code in my app to connect to the database:
environment = ENV['RACK_ENV'] || 'development'
database_config = YAML::load(File.open('config/database.yml'))
ActiveRecord::Base.establish_connection(database_config[environment])
With RACK_ENV at production, I get the following error:
ActiveRecord::AdapterNotSpecified: 'production' database is not configured. Available: []
Looking at the code in the buildpack, I found this:
return false if bundler.has_gem?('activerecord') && bundler.gem_version('activerecord') >= Gem::Version.new('4.1.0.beta1')
To workaround the problem I have downgraded activerecord to 4.0.13. The problem has gone away however I am stuck using an older version of activerecord. I do not know why the limitation on the activerecord version is there.
What version of Cloud Foundry are you using?
$ cf -v
cf version 6.14.1+dc6adf6-2015-12-22
What version of the buildpack you are using?
latest viz. 1.6.18
If you were attempting to accomplish a task, what was it you were attempting to do?
Starting a pushed app.
What was the actual behavior?
-----> Compiling Ruby/Rails
...
!
! uninitialized constant LanguagePack::RubySemverVersion::GemfileReader::RUBY_PLATFORM
!
./Gemfile:6:in `ruby_requirement': uninitialized constant LanguagePack::RubySemverVersion::GemfileReader::RUBY_PLATFORM (NameError)
My Gemfile contains:
gem 'thin' unless RUBY_PLATFORM =~ /mingw|mswin/i
What version of Cloud Foundry are you using?
CF v235.5.50
What version of the buildpack you are using?
1.6.16 & 1.6.20
If you were attempting to accomplish a task, what was it you were attempting to do?
Deploy an application that works on 1.6.16 and fails on 1.6.20.
What did you expect to happen?
Build pack to pick the version set in Gemfile-APP
What was the actual behavior?
Build pack seems to pick the default value.
Attaching a test case. Steps to reproduce:
1.) Target PWS or something with Ruby Build pack 1.6.20 or 21 deployed.
2.) Run cf push
3.) You should get a failure message like this.
Downloading ruby_buildpack...
Downloaded ruby_buildpack
Creating container
Successfully created container
Downloading app package...
Staging...
Downloaded app package (1.7K)
-------> Buildpack version 1.6.21
Downloaded [file:///tmp/buildpacks/52950f43493e01421589bf265ae8c07e/dependencies/https___buildpacks.cloudfoundry.org_concourse-binaries_bundler_bundler-1.12.5.tgz]
-----> Compiling Ruby/Rack
Downloaded [file:///tmp/buildpacks/52950f43493e01421589bf265ae8c07e/dependencies/https___buildpacks.cloudfoundry.org_concourse-binaries_ruby_ruby-2.3.1-linux-x64.tgz]
-----> Using Ruby version: ruby-2.3.1
-----> Installing dependencies using bundler 1.12.5
Downloaded [file:///tmp/buildpacks/52950f43493e01421589bf265ae8c07e/dependencies/https___buildpacks.cloudfoundry.org_ruby_binaries_cflinuxfs2_libyaml-0.1.6.tgz]
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Your Ruby version is 2.3.1, but your Gemfile specified 2.2.4
Bundler Output: Your Ruby version is 2.3.1, but your Gemfile specified 2.2.4
!
! Failed to install gems via Bundler.
!
Failed to compile droplet
Exit status 223
Staging failed: Exited with status 223
Destroying container
Successfully destroyed container
Note: Your Ruby version is 2.3.1, but your Gemfile specified 2.2.4
Please confirm where necessary:
Hi all,
We'd like to let you know that in the next week we'll be scheduling work to update the default version of Ruby in the Ruby Buildpack from 2.2.x to 2.3.x. This change only affects application that don't specify the version of Ruby in the Gemfile.
Please let us know if this is an undesired change either by commenting on this issue or replying to this thread. Also, please keep in mind that you can always force the buildpack to use a specific version of ruby by adding the following line to your Gemfile
:
ruby "2.2.4"
What version of Cloud Foundry are you using?
version: 220
What version of the buildpack you are using?
v1.6.19
If you were attempting to accomplish a task, what was it you were attempting to do?
$ ruby -v
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
$ bundle -v
Bundler version 1.11.2
$ gem -v
2.4.8
$ cat manifest.yml
---
applications:
- name: hello-ruby
buildpack: https://github.com/cloudfoundry/ruby-buildpack.git#v1.6.19
$ cat Gemfile
source 'https://rubygems.org'
gem "mime-types", (RUBY_VERSION >= "2.0" ? "~> 3.0" : "~> 2.99") # Breaks building, get from redmine 3.2.3
gem 'sinatra'
gem 'puma'
$ bundle install
...
$ cf push --random-route
Using manifest file <...>/hello-ruby/manifest.yml
Updating app hello-ruby in <...>...
OK
Creating route <...>...
OK
Binding <...>...
OK
Uploading hello-ruby...
Uploading app files from: <...>/hello-ruby
Uploading 2.9M, 773 files
Done uploading
OK
Stopping app hello-ruby in <...>...
OK
Starting app hello-ruby in <...>...
-----> Downloaded app package (2.4M)
-----> Downloaded app buildpack cache (2.2M)
Cloning into '/tmp/buildpacks/ruby-buildpack'...
Note: checking out '721f78f9af3da2891c6ca27cafe8c3f8051cb5fb'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
do so (now or later) by using -b with the checkout command again. Example:
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
git checkout -b new_branch_name
Submodule 'compile-extensions' (https://github.com/cloudfoundry/compile-extensions) registered for path 'compile-extensions'
Cloning into 'compile-extensions'...
Submodule path 'compile-extensions': checked out '4a0e48afc46c1d467b7c75a8ae5e6f3a044d3d64'
-------> Buildpack version 1.6.19
Downloaded [https://pivotal-buildpacks.s3.amazonaws.com/concourse-binaries/bundler/bundler-1.12.5.tgz]
-----> Compiling Ruby/Rack
sh: 1: Syntax error: EOF in backquote substitution
!
! undefined method `>=' for nil:NilClass
!
./Gemfile:3:in `ruby_requirement': undefined method `>=' for nil:NilClass (NoMethodError)
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/ruby_semver_version.rb:32:in `instance_eval'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/ruby_semver_version.rb:32:in `ruby_requirement'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/ruby_semver_version.rb:7:in `initialize'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/ruby_version.rb:126:in `new'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/ruby_version.rb:126:in `update_version'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/ruby_version.rb:38:in `initialize'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/ruby.rb:187:in `new'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/ruby.rb:187:in `block in ruby_version'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/instrument.rb:17:in `block in instrument'
from /usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/instrument.rb:16:in `instrument'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/base.rb:48:in `instrument'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/base.rb:44:in `instrument'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/ruby.rb:180:in `ruby_version'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/ruby.rb:331:in `block in install_ruby'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/instrument.rb:17:in `block in instrument'
from /usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/instrument.rb:16:in `instrument'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/base.rb:48:in `instrument'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/base.rb:44:in `instrument'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/ruby.rb:330:in `install_ruby'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/ruby.rb:93:in `block in compile'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/instrument.rb:17:in `block in instrument'
from /usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/instrument.rb:16:in `instrument'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/base.rb:48:in `instrument'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/base.rb:44:in `instrument'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/ruby.rb:88:in `compile'
from /tmp/buildpacks/ruby-buildpack/bin/compile:23:in `block (2 levels) in <main>'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/base.rb:129:in `log'
from /tmp/buildpacks/ruby-buildpack/bin/compile:22:in `block in <main>'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/instrument.rb:35:in `call'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/instrument.rb:35:in `block in trace'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/instrument.rb:18:in `block (2 levels) in instrument'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/instrument.rb:40:in `yield_with_block_depth'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/instrument.rb:17:in `block in instrument'
from /usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/instrument.rb:16:in `instrument'
from /tmp/buildpacks/ruby-buildpack/lib/language_pack/instrument.rb:35:in `trace'
from /tmp/buildpacks/ruby-buildpack/bin/compile:18:in `<main>'
Staging failed: Buildpack compilation step failed
FAILED
Error restarting application: BuildpackCompileFailed
TIP: use 'cf logs hello-ruby --recent' for more information
What did you expect to happen?
I tried to push redmine 3.2.3 to the cloudfoundry with latest buildpack (v1.6.19), but it fails. Seems like during ruby-buildpack building ruby applications, there is a preprocess on Gemfile and it breaks on non-trivial Gemfile.
The ruby-buildpack v1.6.17 works and the v1.6.18/v1.6.19 breaks.
Also syntax in Gemfile such as
if Gem::Version.new(Bundler::VERSION) < Gem::Version.new('1.5.0')
abort "Redmine requires Bundler 1.5.0 or higher (you're using #{Bundler::VERSION}).\nPlease update with 'gem update bundler'."
end
also fails. This is also from redmine Gemfile.
What was the actual behavior?
Described above
Please confirm where necessary:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.