I'm trying to go through a Heroku tutorial, and when I try to upload a public key here's what happens.
$ heroku keys:add
C:\dev\Ruby193\bin\ruby.exe: No such file or directory -- /cygdrive/c/dev/Ruby19
3/bin/heroku (LoadError)
I confirmed that there is definitely a heroku file in the bin directory, it's just not being picked up. Any ideas?
Here's the tutorial.
http://www.packtpub.com/article/building-tiny-web-applications-in-ruby-using-sinatra
Do the following first:
gem install heroku
than you can go for
heroku keys:add
Related
I wanted to create/change/command directly to the heroku app through heroku CLI, ps:exec command.
For example, I actually tried to update an spree(ecommerce framework written Rails) app I created using Heroku button. After I created the app with Heroku button, I found I need an extension,
spree_digital to create digital product. So I tried following steps:
heroku ps:exec -a spreeapp
$ # install nano editor here
$ nano Gemfile # added a line: gem 'spree_digital', github: 'spree-contrib/spree_digital'
$ bundle install
$ bundle exec rails g spree_digital:install # and no error.
$ exit
heroku ps:restart # the git repo says server restart is required so
heroku ps:exec -a spreeapp # and test if that the Gemfile is same as the line added one
$ cat Gemfile # and I found that the file I changed didn't change..
I'm new to Heroku, your each comment must be fuge help for me. Thanks.
I have a program that I wrote using ruby. It doesn't have any web interface, but I use bundler for dependency management.
On my local system, running the app is as simple as typing rake app:start, and it loads up just fine.
When I deploy to heroku, however, my app crashes with a cannot load such file -- bundler error.
My Procfile looks has this entry app: bundle exec rake app:start.
Any help is greatly appreciated.
The problem was that Heroku was not changing the GEM_HOME field to the vendor/bundle directory.
By adding the following config vars to Heroku, my app ran as expected:
GEM_HOME: /app/vendor/bundle/ruby/1.9.1
PATH: /app/vendor/bundle/ruby/1.9.1/bin:bin:node_modules/.bin:/usr/local/bin:/usr/bin:/bin
Adding these was done via the heroku config:set CONFIG_NAME=VALUE command.
I get an "Could not find RubyGem heroku (Gem::LoadError)" when I try to execute any Heroku commands from terminal in my app directory. Have tried wiping and reinstalling Toolbelt, as well as any previously installed Heroku gems.
Using the full path works and--app name works (/usr/bin/heroku config--app myapp-stage). Using OS X 10.8.1.
echo $PATH
/Users/johndoe/.rvm/gems/ruby-1.9.3-p194#llctlc/bin:/Users/johndoe/.rvm/gems/ruby-1.9.3 p194#global/bin:/Users/johndoe/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/johndoe/.rvm/bin:/Users/johndoe/.gem/ruby/1.8/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/usr/bin/heroku:/opt/local/sbin:/opt/local/bin:/usr/local/mysql/bin:/Users/johndoe/.ec2/bin:/usr/local/git/bin
$ heroku
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem heroku (>= 0) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in `gem'
from /Users/johndoe/.gem/ruby/1.8/bin/heroku:18
Thanks in advance for any help or advice.
I had the same problem.
Uninstall the Gem gem uninstall heroku (Select 'All Versions').
Find your Ruby 'bin' path by running gem env (it's under 'EXECUTABLE DIRECTORY:')
cd to the bin folder.
Remove the Heroku executable rm heroku
Restart your shell (close Terminal tab and re-open)
Hit heroku version, you should now see something like:
heroku-toolbelt/2.33.1 (x86_64-darwin10.8.0) ruby/1.9.3
Now you can heroku login as per their instructions and get back to hacking :)
I can find my apps in heroku apps command, and also do some command to read information from app like heroku addons --app appname.
But I couldn't find my apps in some command like heroku addons:add addon_name, heroku pg:reset.
Work commands
heroku apps:
=== My Apps
my_app_1
my_app_2
(Also I can see my apps in heroku web dashboard.)
heroku addons --app my_app_1(not in my_app_1 folder):
=== my_app_1 Configured Add-ons
shared-database:5mb
heroku addons(in my_app_1 folder):
=== my_app_1 Configured Add-ons
shared-database:5mb
Doesn't work commands
heroku addons:add sendgrid(in my_app_1 folder):
! No app specified.
! Run this command from an app folder or specify which app to use with --app
heroku pg:reset DATABASE --confirm my_app_1(in my_app_1 folder):
Resetting SHARED_DATABASE (DATABASE_URL)... failed
! Resource not found
Here is my environment.
Max OS X Lion (10.7.4)
rvm 1.13.8 (stable)
ruby 1.9.3p194
heroku 2.26.5
Adding the heroku's remote configuration to git did the trick for me. Validate if you have it configured with git remote -v on the terminal and you should get something like:
heroku git#heroku.com:your-app.git (fetch)
heroku git#heroku.com:your-app.git (push)
if you don't, add it with
git remote add heroku git#heroku.com:your-app.git
It looks like the latest version fo the Heroku gem (2.26.5) is broken. A workaround is to downgrade to 2.26.3.
gem uninstall heroku -v 2.26.5
gem install heroku -v 2.26.3
It looks like you have a conflict between the Heroku gem, and the Heroku Toolbelt. I'm guessing you have installed the Heroku Toolbelt, but still have the Heroku gem in your gem file.
Remove the Heroku gem from your Gemfile and save.
Run the bundle command to update your Gemfile.lock
In Terminal, run gem uninstall heroku (NOTE: there may be multiple versions of the Heroku gem installed, and you'll need to uninstall all of them.)
In Terminal, run heroku addons
If you get heroku: command not found then you don't have the Heroku Toolbelt installed.
Install the Heroku Toolbelt and run the command again.
NOTE: If you're not in the app's directory, you'll need to add --app myapp1 to the Heroku commands.
Hope this helps.
I am learning ruby from this guide http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec:deploying, and I am trying to install and make heroku to work. I added heroku to the PATH variable, (I am using ubuntu) bun when i type #command: herokuit returns this:
"/usr/lib/ruby/1.8/rubygems.rb:779:in 'report_activate_error': Could not find RubyGem heroku (>=0) (Gem::LoadError)
from /usr/lib/ruby/1.8/rubygems.rb:214:in 'activate'
...
...
..."
Looks like you haven't installed the Heroku gem;
sudo gem install heroku