QUEUE=* not found error on Foreman - ruby-on-rails-3

I'm trying to use foreman to run my app locally, using the same Procfile I use when deploying my app on Heroku, where it works perfectly. However, when running foreman start on my terminal, foreman gives an error saying:
line 41: exec: QUEUE=*: not found
What I gather from this is that foreman doesn't recognize QUEUE=* as a command. So why does it work on Heroku? And what can I do to run the command exactly as it is run in production mode?

I ran into the same issue. You want to put the queue param at the end.
eg:
worker: bundle exec rake jobs:work QUEUE=hi

Related

Gitlab runner immediately fails & doesn't create the build folder. Works well when its run on debug mode

I'm quite new to gitlab CI and have setup my server at DigitalOcean with gitlab-runnner. When I start the gitlab-runner by the command sudo gitlab-runner start, it runs fine and I confirm it with gitlab-runner status. But, the job fails immediately as per this screenshot
However, when I run gitlab-runner --debug run, the job runs perfectly fine.
I want to run gitlab-runner as a background service but its not running my jobs.
I found a solution to this issue from gitlab. For me, the solution was to comment out the clear console command from .bash_logout file in the gitlab-runner home folder.
More information about this issue can be taken from a bug logged at gitlab.
https://gitlab.com/gitlab-org/gitlab-runner/-/issues/4449

How to change the default setting '-DskipTests=true' during Heroku deployment?

I am trying to deploy a Java project from Beanstalk using Heroku. But during the deployment process, the tests are skipped by default. I am aware that the default settings for Dskiptests is true. Is it possible to run tests using Heroku? Where do I change the settings to overwrite the default settings.
Here is how the build is started by default:
output -----> Java app detected
output -----> Installing OpenJDK 1.8... done
output -----> Executing: mvn -B -DskipTests=true clean install
Run this command:
$ heroku config:set MAVEN_CUSTOM_OPTS=""
For more information see:
https://github.com/heroku/heroku-buildpack-java#customize-maven
Mine was working perfectly with out any change, suddenly stopped. Tried bellow and worked
heroku config:set MAVEN_CUSTOM_OPTS="-DskipTests=false"
btw I tried to set empty string as the value of MAVEN_CUSTOM_OPTS did not worked.
In case you want to know current value of all variable try:
heroku run printenv
You can also configure MAVEN_CUSTOM_OPTS in the Heroku Dashboard.

Heroku + Error occured while executing heroku run rake command

I am trying to deploy a sample app at Heroku. Whole code is pushed to heroku.
Now i am running a 'heroku run rake' command to create db and one table at heroku. But I am getting some error.
"A connection attempt failed because the connected party did not
properly"
I am not getting th way to resolve it.
Rails Console:
database.yml

rake system command causes bundle error

I'm trying to run this rake task but it keeps on returning the following error:
Could not find libv8-3.3.10.4 in any of the sources
Run `bundle install` to install missing gems.
When I try and run bundle install bundler says everything is up to date.
I am running the task using this command:
bundle exec rake deploy:staging
Here's what my rake task looks like:
task :staging do
app = "heroku-app-name"
puts "Turn maintenance on"
system "heroku maintenance:on --app #{app}"
end
I was able to shell out to heroku commands from a rake task by wrapping the command in a Bundler.with_clean_env block like as follows:
Bundler.with_clean_env do
system "heroku maintenance:on --app #{app}"
end

Can Push to Heroku But Can't Run Migration

I can push a Rails app to Heroku with ...
git push heroku
but when I try to migrate with ...
heroku run rake db:migrate
I get ...
Running rake db:migrate attached to terminal... failed
! You do not have access to the app my-app-name-1234.
Edit: my .git/config contains ...
[remote "heroku"]
url = git#heroku.com:young-mist-1198.git
fetch = +refs/heads/*:refs/remotes/heroku/*
Any ideas? Things look reasonable on the Heroku side and it seems like if my ssh key were bad, it wouldn't even let me push.
OK, I figured it out and in case it helps someone else ...
heroku auth:login
somehow I was not authorized and just needed to re-login.
try this
heroku run bash --app appname
heroku run rake db:migrate