Heroku bundle: command not found - ruby-on-rails

I'm trying to deploy a Rails/ReactJS app on Heroku, and I've committed and pushed the app onto it. However, when I try to run any rake command, or bundler --version on the Heroku CLI, I get the following error:
bash: bundler: command not found
I've tried the following to no avail.
$ heroku config:set GEM_PATH=vendor/bundle/ruby/3.1.1
$ heroku config:set PATH=bin:vendor/bundle/ruby/3.1.1/bin:/usr/local/bin:/usr/bin:/bin
I'm on Ruby 3.1.1. Any help would be appreciated, thank you!

Related

Heroku Run Rails Console Not Working

$ heroku run rails c
-bash: heroku: command not found
I don't get it. Isn't that how you are suppose to startup the heroku console?
Install the heroku toolbelt first, and then try again your heroku run rails c command.
To verify your toolbelt installation use:
$ heroku --version
See Heroku CLI for more information.

rake db:migrate bundle: command not found

I'm using Heroku and cloud9.io for my app.
I get the Error:
bash: bundle: command not found
When i try run the command:
heroku run rake db:migrate
Localy my app works fine without any error but i'm not able to migrate and i get the Application on herokuapp.com path.
Your problem may be due to the version of Ruby you are running.
I had a similar issue before, I tried everything possible(installing bundler, etc.), but one thing that worked for me was to manually set the config using following command:
heroku config:add GEM_PATH=vendor/bundle/1.8
Please note that you should change 1.8 to the version of Ruby you are currently running.

coding with heroku and some addones and sendgrid function

Hi i am doing some coding with heroku and now i am running with some problem more specifically using this code in my terminal
sudo heroku addones:add sendgrid:starter --app project1
end result
Adding sendgrid:starter on project1... failed
! You do not have access to the app project1.
I am a bit new with ubuntu and ruby on rails so i dont have any god idea with this exept with ssh but my main problem is why and how any info or help would really be appreciated
Make sure you're logged into the account that owns/has permissions to project1 by running:
heroku login
Also, you have a syntax error in your command, should be:
heroku addons:add sendgrid:starter --app project1

heroku run rake db:migrate failed: command not found

I'm a novie in heroku. When I was performing my CS169.1x homework2 (deploying an application) I ran into a problem with database filling using the following command: heroku run rake db:migrate. Here is terminal dump:
saasbook#saasbook:~/Documents/hw2_rottenpotatoes$ git pull heroku master
From heroku.com:afternoon-cove-7289
* branch master -> FETCH_HEAD
Already up-to-date.
saasbook#saasbook:~/Documents/hw2_rottenpotatoes$ git push heroku master
Everything up-to-date
saasbook#saasbook:~/Documents/hw2_rottenpotatoes$ heroku run rake db:migrate
heroku run rake db:migrate: command not found
saasbook#saasbook:~/Documents/hw2_rottenpotatoes$
What may be wrong? If there is error dump on heroku to check?
Have you installed the heroku gem? If you have heroku in the gemfile, you may need to do
bundle exec heroku run...
just to make sure you have heroku installed, what happens when you run:
$heroku help

Heroku rails error trying to bring up console - sh: rails: not found

Trying to run the Heroku console but I am getting this following:
heroku run console
Running console attached to terminal... up, run.1
sh: console: not found
$ heroku run bash works but I seem to get a (green) bash prompt - "~ $" not a rails console! Can I get into the console from here?
fyi
git push heroku v311
Everything up-to-date
The first error is thrown simply because the console command doesn't exist. I personally have never meet a command called console in my life.
The syntax is heroku run the_command_i_want_to_run. For example: heroku run irb or heroku run bash.
The second error: There's no Rakefile in your project root. Since heroku run rails console say that Rails wasn't found, my guess is that your project wasn't (well) deployed.
Make sure you've done git push heroku.
You may also need to check the logs: heroku logs.
a guess:
heroku run rails console
If you're on the Bamboo stack (older stack than Cedar), try:
heroku run script/rails console
This works for me and is the command recommended in Heroku docs.
I got confused by this too.
It's just
$ heroku run console
Do this
heroku run -a my-app script/rails console
Reference: https://devcenter.heroku.com/articles/console-bamboo

Resources