I am working with Heroku on a win 7 - 32 bit system where I don't have admin privileges.
I have downloaded and installed the heroku toolbelt following http://community.webfaction.com/questions/11803/heroku-toolbelt with
cd ~
curl http://assets.heroku.com/heroku-client/heroku-client.tgz | tar zx
export PATH=$HOME/heroku-client/bin/:$PATH
following Leo's advice ,I've added ruby to the windows path to fix this
Now when I run:
$ heroku run bash --app MYAPP
I get:
f:/heroku-client/lib/heroku/updater.rb:164:in `spawn': Exec format error - "m:/heroku-client/bin/heroku" update (Errno::ENOEXEC)
from f:/heroku-client/lib/heroku/updater.rb:164:in `background_update!'
from f:/heroku-client/lib/heroku/updater.rb:144:in `inject_libpath'
from f:/heroku-client/bin/heroku:19:in `<main>'
I have added to the windows env variable path:
F:/heroku-client/bin/;f:/heroku-client/lib/heroku/
How can I fix this?
I had the same issues initially with ROR on Windows. (Everyone suggested me to move to LINUX/UNIX)
Still I managed to install it on Windows. Rather than installing the Heroku Toolbet (which breaks ruby and rails which is already installed) install the heroku gem along with foreman gem.
gem install heroku
gem install foreman
Then u can use it easily.
Install the Windows Heroku Toolbelt. It's self-contained and should work out of the box for you.
Related
I installed Heroku toolbelt for windows and now when I try to run heroku commands in the shell nothing happens.
user#canacher-pc MINGW32 ~
$ heroku login
user#canacher-pc MINGW32 ~
$ heroku version
user#canacher-pc MINGW32 ~
$ heroku create
user#canacher-pc MINGW32 ~
$
I notice that in the installation was include ruby v2.1.7 and I had previously installed ruby v1.9.3, I don't know if that a problem. I'm using windows XP.
Please follow the instructions at: https://devcenter.heroku.com/articles/heroku-command
Also, read my answer at Heroku_can't upgrade to Cedar-14
I'm setting up the staging and production server on Ubuntu, deploy with Capistrano. Both server has pretty much the same setup. But for for some reason. I can access console on production server with rails c produciton. But when I try to access console on staging server using rails c staging
The program 'rails' can be found in the following packages:
* ruby-railties-3.2
* ruby-railties-4.0
Try: sudo apt-get install <selected package>
The only way to access console on my staging server is to do
bundle exec rails console staging
On staging
the rvm seems to be correct, I can see the ruby version I'm using.
the gemset that the application use is there.
the application is running fine. Just can't access console with 'rails c'
But for some reason, I can't access console with rails c. Any idea how to solve this issue?
I guess you didn't install rails globally. First, check your rails version you are currently using by bundle exec rails -v. Then, install rails globally by gem install rails -v <version>. This should solve your issue.
Run bundle install only makes rails available inside bundler. In most cases, this should be enough, because bundler helps prevent headaches of version conflicts.
A couple of questions to understand better the situation...
Have you tried running bundle install for the current ruby version set on rvm for that application on that server?
Have you updated the gems for another application/branch? sometimes that happens because the rails c command uses the latest gems available and bundle exec... locates and uses the gems tied to the Gemfile.lock.
The application should run fine because it uses the gems that the Gemfile.lock has listed.
I used Fedora 21 in VirtualBox to create a rails app.
I have installed Ruby, Rails, rubygem, and bundle ($ bundle install) for my rails app.
However, when I go to http://localhost:3000/, there is an error...
When I run this command :
$ rails server
There is an error : Could not find a Javascript runtime
Thank you for your help.
run bundle exec rails server if it still there try this
yum -y install nodejs
or look at this
I've been having trouble trying to update to the latest version of Heroku on Cloud9 as you can see here:
~/workspace/hello_app (master): $ heroku version
heroku-toolbelt/3.31.3 (x86_64-linux) ruby/2.1.5
You have no installed plugins.
WARNING: Toolbelt v3.37.6 update available.
But when I try to update it, this is what I got:
~/workspace/hello_app (master):$ heroku update
! To update this version of the Heroku client please use
! `apt-get install heroku-toolbelt`
Then I tried typing in 'apt-get install heroku-toolbelt' into my terminal and this was the result:
~/workspace/hello_app (master): $ apt-get install heroku-toolbelt
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
I have also tried to install Heroku Toolbelt using https://toolbelt.heroku.com/ , but I still seem to get the same warning that you see with the first code above telling me that I need to update it to v 3.37.6 . I'm sorry for this newbie mistake, but is there anyone out there that can help me resolve this little issue, please? Thanks.
You should use
sudo apt-get install heroku-toolbelt
In the new version of Cloud9 we don't have support for deployment from the UI yet unfortunately.
You can manually install various command-line tools into your workspace and deploy using the command line. It should go without saying that this is for developers that aren't afraid of the command line.
https://docs.c9.io/v1.0/docs/deploying-via-cli
I got the same problem and it got resolved by this..
$ heroku login
$ heroku version
heroku-toolbelt/3.37.6 (x86_64-linux) ruby/2.2.1
You have no installed plugins.
$ heroku plugins:update
$ heroku plugins:install
Installing Heroku Toolbelt v4... done
Setting up node-v4.1.2... done
Installing core plugins heroku-cli-addons, heroku-apps, heroku-fork, heroku-git, heroku-local, heroku-run, heroku-status... done
▸ Missing argument: NAME
$ heroku version
heroku-toolbelt/3.37.6 (x86_64-linux) ruby/2.2.1
heroku-cli/4.25.2-beb750a (amd64-linux) go1.5.1
=== Installed Plugins
heroku-apps#0.3.0
heroku-cli-addons#0.0.2
heroku-fork#4.0.0
heroku-git#2.4.1
heroku-local#4.1.4
heroku-run#2.7.1
heroku-status#1.2.2
I just started to learn Rails from railstutorial.org. After installing Rails I cerated an app, set up git, installed Heroku gem, and uploaded SSH key to heroku.
After that, I turned off my computer and a few hours later I came back to continue with the next steps. First I ran heroku create --stack cedar.
Then,
git push heroku master I get the following error message:
[~ (master)]$ git push heroku master
fatal: 'heroku' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
Same thing is happening for commands like rails heroku gem etc.
Also, I cannot find neither Ruby or Rails in my system. When I ran ruby -v I get
The program 'ruby' can be found in the following packages:
* ruby1.8
* ruby1.9.1
Try: sudo apt-get install <selected package>
Is this happening because I am running Ruby 1.9.3p125? Please help.
just type
rvm gemset list
rvm use 1.9.3#(you_gemset) --default
EDIT: i've looked this tutorial, and there he's created gemset: rails3tutorial2ndEd
then just type: rvm use 1.9.3#rails3tutorial2ndEd --default
You probably haven't set ruby 1.9.3 as your default ruby with rvm. You can do this by typing in the command line:
rvm use 1.9.3 --default
This should solve your problem.