Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"bash: bundle: command not found" error on test/ruby application #37

Closed
JunichiIto opened this issue Aug 21, 2014 · 2 comments
Closed

Comments

@JunichiIto
Copy link

I tried to run the sample application 'test/ruby' against Heroku, but the application (http://dry-stream-4200.herokuapp.com/) says "Application Error". I found "bash: bundle: command not found" in the log.

You can see what I did here. I appreciate if you could tell me what to do.

➜  oss  git clone git@github.com:virtualstaticvoid/heroku-buildpack-r.git
Cloning into 'heroku-buildpack-r'...
remote: Counting objects: 1013, done.
remote: Total 1013 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (1013/1013), 159.18 KiB | 66.00 KiB/s, done.
Resolving deltas: 100% (376/376), done.
Checking connectivity... done
➜  oss  cd heroku-buildpack-r/
➜  heroku-buildpack-r git:(master) rm -rf .git 
➜  heroku-buildpack-r  cd test/ruby
➜  ruby  git init
Initialized empty Git repository in /Users/jit/dev/oss/heroku-buildpack-r/test/ruby/.git/
➜  ruby git:(master) ✗ git add .
➜  ruby git:(master) ✗ git commit -am 'Initial commit'
[master (root-commit) 025e779] Initial commit
 9 files changed, 114 insertions(+)
 create mode 100644 .buildpacks
 create mode 100755 .env
 create mode 100644 Gemfile
 create mode 100644 Gemfile.lock
 create mode 100644 Procfile
 create mode 100644 application.rb
 create mode 100644 config.ru
 create mode 100755 init.r
 create mode 100755 install
➜  ruby git:(master) ls
Gemfile        Gemfile.lock   Procfile       application.rb config.ru      init.r         install
➜  ruby git:(master) heroku create --stack cedar --buildpack http://github.com/virtualstaticvoid/heroku-buildpack-r.git
Creating dry-stream-4200... done, stack is cedar
BUILDPACK_URL=http://github.com/virtualstaticvoid/heroku-buildpack-r.git
http://dry-stream-4200.herokuapp.com/ | git@heroku.com:dry-stream-4200.git
Git remote heroku added
➜  ruby git:(master) git push heroku master
Initializing repository, done.
Counting objects: 11, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 1.82 KiB | 0 bytes/s, done.
Total 11 (delta 0), reused 0 (delta 0)

-----> Fetching custom git buildpack... done
-----> R app detected
       Vendoring R 3.1.0
       Downloading and unpacking R binaries
       Executing init.r script
       R 3.1.0 successfully installed
-----> Discovering process types
       Procfile declares types -> web

-----> Compressing... done, 121.0MB
-----> Launching... done, v4
       http://dry-stream-4200.herokuapp.com/ deployed to Heroku

To git@heroku.com:dry-stream-4200.git
 * [new branch]      master -> master
➜  ruby git:(master) heroku logs
2014-08-21T05:52:25.933819+00:00 heroku[api]: Enable Logplex by jit@example.com
2014-08-21T05:52:25.933819+00:00 heroku[api]: Release v2 created by jit@example.com
2014-08-21T05:52:27.802134+00:00 heroku[api]: Release v3 created by jit@example.com
2014-08-21T05:52:27.802134+00:00 heroku[api]: Set BUILDPACK_URL config vars by jit@example.com
2014-08-21T05:53:06.673103+00:00 heroku[api]: Deploy 025e779 by jit@example.com
2014-08-21T05:53:06.673180+00:00 heroku[api]: Release v4 created by jit@example.com
2014-08-21T05:53:06.564924+00:00 heroku[api]: Scale to web=1 by jit@example.com
2014-08-21T05:53:06+00:00 heroku[slug-compiler]: Slug compilation finished
2014-08-21T05:53:15.219585+00:00 app[web.1]: bash: bundle: command not found
2014-08-21T05:53:25.440580+00:00 app[web.1]: bash: bundle: command not found
2014-08-21T05:53:27.822389+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=dry-stream-4200.herokuapp.com request_id=e922c37e-cf74-4e9f-ac97-a561fb6a502d fwd="115.65.138.192" dyno= connect= service= status=503 bytes=
➜  ruby git:(master) heroku config
=== dry-stream-4200 Config Vars
BUILDPACK_URL: http://github.com/virtualstaticvoid/heroku-buildpack-r.git
➜  ruby git:(master) heroku run 'ruby -v'
Running `ruby -v` attached to terminal... up, run.6029
ruby 1.9.2p330 (2014-08-07 revision 47094) [x86_64-linux]
@virtualstaticvoid
Copy link
Owner

Hi @JunichiIto

This example uses the heroku-buildpack-multi buildpack so that both the R and Ruby buildpacks are installed. The error you got is because Ruby (and bundler) wasn't installed.

When you create the heroku app, use the following command instead:

heroku create -s cedar -b https://github.com/ddollar/heroku-buildpack-multi.git

You will see in the example folder, a .buildpacks file which heroku-buildpack-multi uses to load the R and Ruby ones.

There is also an install script with the steps needed to deploy the example, so all you need to do is clone this repository, cd into the test/ruby folder and run install.

Hope this helps.

@JunichiIto
Copy link
Author

Thank you, I will give it a try later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants