I am trying to deploy my first rails application to heroku, and unfortunately I am getting an error when running the heroku create command:
# C:\railsprojects\sample_app> heroku create
The system cannot find the path specified.
Creating protected-reaches-1026... done, stack is cedar
http://protected-reaches-1026.herokuapp.com/ | git#heroku.com:protected-reaches-1026.git
! Heroku client internal error.
! Search for help at: https://help.heroku.com
! Or report a bug at: https://github.com/heroku/heroku/issues/new
Error: No such file or directory - git --version (Errno::ENOENT)
Backtrace: C:/Users/paul/.heroku/client/lib/heroku/helpers.rb:103:in ``'
C:/Users/paul/.heroku/client/lib/heroku/helpers.rb:103:in `has_git?'
C:/Users/paul/.heroku/client/lib/heroku/helpers.rb:108:in `git'
C:/Users/paul/.heroku/client/lib/heroku/helpers.rb:156:in `create_git_remote'
C:/Users/paul/.heroku/client/lib/heroku/command/apps.rb:255:in `create'
C:/Users/paul/.heroku/client/lib/heroku/command.rb:206:in `run'
C:/Users/paul/.heroku/client/lib/heroku/cli.rb:28:in `start'
C:/Program Files (x86)/Heroku/bin/heroku:29:in `<main>'
Command: heroku create
Version: heroku/toolbelt/2.39.4 (i386-mingw32) ruby/1.9.3
My initial thought is that GIT is not in the path or otherwise cannot be called, but I eliminated that as part of the problem by simply running git --version:
# C:\railsprojects\sample_app> git --version
git version 1.8.3.msysgit.0
So, everything seems to be in order. Anyone else know what could be going wrong?
I am running Windows 7, and the version of the Heroku client is heroku/toolbelt/2.39.4 (i386-mingw32) ruby/1.9.3.
shouldn't you give the name of the application you want to create. Like heroku create application_name. That is what says in this link.
Related
Processing /D:/bld/astroid_1640971040574/work
remote: ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/D:/bld/astroid_1640971040574/work'
I am having above error while trying to upload to heroku using git push heroku main.
How can I push the changes?
Either what you are specifying includes a PATH (a local path which is only valid on your workstation, you local development environment).
Or what you are executing includes a path.
On the specification side, as explained here, check your requirements.txt file content (no path should be there)
On the execution side, make sure your server.js is not using PWD.
might be your project is in master branch of github.But you are trying to push main branch in heroku. Please check the branch in github where you uploaded the project carefully then push accordingly. Please upload with the screanshot of all command you given there.
I have wrote a script for issue reminder
cd /var/www/redmine
/usr/local/rvm/gems/ruby-2.2.5/wrappers/rake reminder:exec RAILS_ENV="production
But while running the above script getting error
/usr/local/rvm/gems/ruby-2.2.5/gems/htmlentities-4.3.1/lib/htmlentities/mappings/expanded.rb:465: warning: duplicated key at line 466 ignored: "inodot"
rake aborted!
Don't know how to build task 'reminder:exec' (see --tasks)
/usr/local/rvm/gems/ruby-2.2.5/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.2.5/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.2.5/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)
The rake task seems to be added by the redmine_mail_reminder plugin. Since the task can not be found apparently, you probably don't have this plugin installed properly (or at all).
It is also possible that you are not in the correct directory. For the rake task to work, you have to change to the root directory of Redmine, i.e. the directory containing the app, lib and plugins directories as well as the Gemfile.
Finally, Redmine itself can send reminders without the use of plugins with the use of a different rake task which is shipped with Redmine itself:
bundle exec rake redmine:send_reminders days=7 RAILS_ENV="production"
See RedmineReminderEmails for details.
I have created a ruby env on amazon elastic beanstalk, but when I try to deploy my rails app from command line using eb deploy I get this error:
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
You need to install git to be able to use gems from git repositories. For help
installing git, please refer to GitHub's tutorial at
https://help.github.com/articles/set-up-git (Executor::NonZeroExitStatus)
[2015-08-09T15:50:38.513Z] INFO [4217] - [CMD-AppDeploy/AppDeployStage0/AppDeployPreHook/10_bundle_install.sh] : Activity failed.
[2015-08-09T15:50:38.513Z] INFO [4217] - [CMD-AppDeploy/AppDeployStage0/AppDeployPreHook] : Activity failed.
[2015-08-09T15:50:38.513Z] INFO [4217] - [CMD-AppDeploy/AppDeployStage0] : Activity failed.
[2015-08-09T15:50:38.514Z] INFO [4217] - [CMD-AppDeploy] : Completed activity. Result:
Command CMD-AppDeploy failed.
So, shall I install git at amazon instance bash directly? will this effect autoscaling?
I don't know if you fixed this, but you need to tell Elastic Beanstalk to install git.
In the root directory of your project, add a folder called .ebextensions.
Create a file inside that folder called (something like) install_git.config (the .config is important).
Add the following lines to that file:
packages:
yum:
git: []
Then redeploy your application, and you shouldn't see that error anymore.
I created a new RubyMotion project using:
motion create NewMotion
Then I installed related bundles:
bundle install
Now whenever I run the app I'm getting an error:
➜ NewMotion rake
/Users/info/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.6.2/lib/bundler/runtime.rb:222: warning: Insecure world writable dir /usr/local in PATH, mode 040777
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:212: warning: Insecure world writable dir /usr/local in PATH, mode 040777
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
rake aborted!
NoMethodError: undefined method `[]' for nil:NilClass
/Library/RubyMotion/lib/motion/project/xcode_config.rb:87:in `xcode_version'
/Library/RubyMotion/lib/motion/project/xcode_config.rb:99:in `validate'
/Library/RubyMotion/lib/motion/project/template/ios/config.rb:85:in `validate'
/Library/RubyMotion/lib/motion/project/config.rb:115:in `setup'
/Library/RubyMotion/lib/motion/project/app.rb:66:in `config'
/Library/RubyMotion/lib/motion/project/template/ios.rb:81:in `block in <top (required)>'
/Users/info/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `eval'
/Users/info/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => default => simulator
(See full trace by running task with --trace)
Please note that I'm using Ruby ruby 2.0.0p353.
Any help would be highly appreciated.
Cheers
Ok seems I got how I solve this problem:
Install Xcode from the developer.apple.com
Point xcode-select to the Xcode Developer Directory
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
I'm trying to get the Neo4j on Heroku and Getting Started with Python on Heroku tutorials up and going. The Neo4j one works fine, but the Python one has problems.
For anyone else trying to follow this tutorial, I've recorded the
problems and my solutions to help you out as well.
This is all done on a Win7 x64 dev machine.
Q1) "virtualenv venv --distribute" - errors with:
'virtualenv' is not recognized as an internal or external command, operable program or batch file.
A1) The workaround is to fully qualify the path to:
"C:\Python27\Scripts\virtualenv venv --distribute"
Q2a) "foreman start" - errors with:
'foreman' is not recognized as an internal or external command, operable program or batch file.
A2) Looks like a path issue so I ran the line:
"set PATH=%PATH%;C:\Program Files (x86)\Heroku\ruby-1.9.2\bin\"
Q2b) "foreman start" now errors:
Bad file descriptor
{Ruby paths...}
A2b) Help?
So I can't run the app locally, but maybe still on the server, so moving on...
Q3) .gitignore - can't create this file on Windows.
A3) Clone another project and copy that file and edit.
Q4) "git push heroku master" - errors with:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
A4) Apparently need to create new SSH keys. Managing Your SSH Keys Note again fully quality the path such as below and select the new key to add to heroku.
"c:\Program Files (x86)\Git\bin\ssh-keygen.exe" -t rsa"
Q5) Try "git push heroku master" the same with the Neo4j test app "flask-py2neo" - errors during the compile. Is this example current?
A5) Remove distribute from requirements.txt.
Any ideas?