ruby,git,heroku,cloud,heroku-toolbelt , Adding a second Heroku app to my local repo, I'm denied access to my apps

## Question:

Tag: ruby,git,heroku,cloud,heroku-toolbelt

I originally had a setup like:

git remote -v
origin  [email protected]: (fetch)
origin  [email protected]: (push)
stage   [email protected]: (fetch)
stage   [email protected]: (push)


where I could push and pull from stage without an issue and run commands like

heroku run console --app stage


however, I added a production app locally leaving me with:

origin  [email protected]: (fetch)
origin  [email protected]: (push)
prod    [email protected]: (fetch)
prod    [email protected]: (push)
stage   [email protected]: (fetch)
stage   [email protected]: (push)


and now when I run

heroku logs --app prod


I get:

 !    You do not have access to the app prod.


as well as for stage.

I even tried doing heroku logout, and heroku login again, and explicitly logged in with the exact same email as the one listed as application owner for both apps, and it still is an issue.

What's going on?

There are two ways to do this. If you want to use the --app flag you need to reference the actual name of the production heroku app.

Another option is to use the --remote flag so that you can execute commands based on the git remote without knowing the name of the app.

So for example you can run the following command on your production instance: heroku logs --remote prod

For clarification, to use the --app syntax, you would have to know the name of the production app: heroku logs --app name-of-production-app

# Related:

## Same enum values for multiple columns

ruby-on-rails,ruby,enums
I need to do something like this: class PlanetEdge < ActiveRecord::Base enum :first_planet [ :earth, :mars, :jupiter] enum :second_planet [ :earth, :mars, :jupiter] end Where my table is a table of edges but each vertex is an integer. However, it seems the abvove is not possible in rails. What might...

## How to pivot array into another array in Ruby

arrays,ruby,csv
I have a multidimensional array like this one : myArray = [["Alaska","Rain","3"],["Alaska","Snow","4"],["Alabama","Snow","2"],["Alabama","Hail","1"]] I would like to end up with CSV output like this. State,Snow,Rain,Hail Alaska,4,3,nil Alabama,2,nil,1 I know that to get this outputted to CSV the way I want it I have to have output array like this: outputArray =[["State","Snow","Rain","Hail"],["Alaska",4,3,nil],["Alabama",2,nil,1]]...

## Rails shared controller actions

ruby-on-rails,ruby,ruby-on-rails-4
I am having trouble building a controller concern. I would like the concern to extend the classes available actions. Given I have the controller 'SamplesController' class SamplesController < ApplicationController include Searchable perform_search_on(Sample, handle: [ClothingType, Company, Collection, Color]) end I include the module 'Searchable' module Searchable extend ActiveSupport::Concern module ClassMethods def...

## Getting code from my forked repository

git,laravel,repository,laravel-5,composer-php
I made a fork from a repository called "chrisbjr/api-guard". the repository latest version is v2.2.2, and I made a release v2.2.3 from my fork. I have my own branch which is dev-fulluth, to get the code from my fork not from the main repo, composer has to contain the below...

## Get the actual value of a boolean attribute

ruby,page-object-gem,rspec3,rspec-expectations
I have the span: <span disabled="disabled">Edit Member</span> When I try to get the value of the disabled attribute: page.in_iframe(:id => 'MembersAreaFrame') do |frame| expect(page.span_element(:xpath => "//span[text()='Edit Member']", :frame => frame).attribute('disabled')).to eq("disabled") end I get: expected: "disabled" got: "true" How do I get the value of specified attribute instead of a...

## regex to pull in number with decimal or comma

ruby,regex
This is my line of code: col_value = line_item[column].scan(/\d+./).join().to_i When I enter 30,000 into the textfield, col_value is 30. I want it to bring in any number: 30,000 30.5 30.55 30000 Any of these are valid... Is there a problem with the scan and or join which would cause it...

## Extended description text on Git

git,bitbucket
I want commit with message and Extended description text to Bitbucket server. It exists on Git-cola software and I need the command line of it. I am using ubuntu and I need terminal command for Extended description git commit -am "My commit text" "My Extended description is this. Containing break...

## Allowing some enabled and disabled option on collection_select

ruby-on-rails,ruby
I am trying to populate a dropdown box on a view that has all the states. This works just fine: <%= f.collection_select :state_id, @states, :id, :name %> Now, I need to make the following: Some states are going to be disabled for choosing, but they still have to appear on...

git,composer-php
I'm using Composer to load my private remote repository from BitBucket: { "require": { "pico/pico-core": "dev-dev" }, "repositories": [ { "type": "git", "url": "https://[email protected]/picodevelopmentteam/php-server-core.git" } ], "autoload": { "psr-0": { "PicoApi\\": "" } }, "minimum-stability": "dev" } My pico-core composer.json looks like this: { "name": "pico/pico-core", "require": { "facebook/php-sdk": "@stable",...

## How can I get the last commit in all tags?

git
I've just made a commit in my project, and I was creating a tag in every step, but it seems the last commit was done in some of this tags. The thing is that I can not longer see my latest change from a minutes ago. How can I checkout...

## Appending an element to a page in VoltRb

html,ruby,opalrb,voltrb