0

Rails run on Cloud9 without any problem. What I want to do is as follows:

  1. run Rails on Heroku
  2. run python program by rake task in Rails (especially python for access AWS s3 by boto to get some.)

current condition is as follows:

  1. Case 1: deployed rails to heroku without any changing. The deploy could be success and there is no problem to run rails app via Web browser. but rails server shows error log (by heroku log --tail )

an error shows "No module named boto"

  1. Case 2: deployed rails to heroku file named requirements.txt on root. Heroku didn't detect it as Ruby Rails app so that rails server didn't run. rails server shows error log (by heroku log --tail ) as heroku[router]: at=error code=H14 desc="No web processes running"

  2. Case 3: deployed rails first as same as case 1. Then, add Python on Buildpacks on Heroku setting, then add requirements.txt, finally deploy again. then it's deployed. but rails server shows error log (by heroku log --tail ) as same as Case3.

if I could run command like pip, it will be easy, but it's impossible. is there any idea to solve the above?

1 Answers1

0

Instead of trying to install your custom boto on Heroku, just place your custom boto folder in your project's directory (at the same level as your project's apps). Thereafter, you can import the boto folder using the import statement. You can read about importing a module here

Although, the ideal way to do it is to use the Rails SDK for AWS instead of using the Python SDK for AWS and then trying to use it with Rails. All the functionality available with Boto is available with the SDK for Ruby as well.

Check http://docs.aws.amazon.com/sdk-for-ruby/v2/developer-guide/

Community
  • 1
  • 1
Karan Shah
  • 1,304
  • 11
  • 15
  • I don't intend to install my custom boto on Heroku. I just want to use normal Boto. You just can try deploying any rails app in to Heroku with requirements.txt to install module. Install will be succeeded, but rails app doesn't run. – IBE NORIAKI Jan 11 '17 at 06:24
  • What I meant was that instead of installing boto, download it and make it a part of your repo – Karan Shah Jan 11 '17 at 06:30