Heroku create gives "Permission denied # rb_sysopen " - ruby-on-rails

I had created a project using "heroku create". After changing the name the domain URL was not working so I deleted the project.
Now I'm executing "heroku create" but it is giving an error. I tried many solutions but none of them are working for me. kindly help.
ANAMIKA#W1650044 MINGW64 /c/Sites/myrubyblog (master)
$ heroku create
WARNING: This is the legacy Heroku CLI with limited functionality. Please install the latest CLI.
WARNING: Installation instructions are at https://cli.heroku.com
heroku-cli: Installing CLI... 24.45MB/24.45MBPermission denied # rb_sysopen - C:\Users\ANAMIKA\AppData\Local/heroku/cli/lib/node.exe
C:/Users/ANAMIKA/.heroku/client/lib/heroku/jsplugin.rb:107:in `initialize'
C:/Users/ANAMIKA/.heroku/client/lib/heroku/jsplugin.rb:107:in `open'
C:/Users/ANAMIKA/.heroku/client/lib/heroku/jsplugin.rb:107:in `block (4 levels) in setup'
C:/Program Files (x86)/Heroku/ruby-2.1.7/lib/ruby/2.1.0/rubygems/package/tar_reader.rb:64:in `each'
C:/Users/ANAMIKA/.heroku/client/lib/heroku/jsplugin.rb:98:in `block (3 levels) in setup'
C:/Program Files (x86)/Heroku/ruby-2.1.7/lib/ruby/2.1.0/rubygems/package/tar_reader.rb:28:in `new'
C:/Users/ANAMIKA/.heroku/client/lib/heroku/jsplugin.rb:96:in `block (2 levels) in setup'
C:/Users/ANAMIKA/.heroku/client/lib/heroku/jsplugin.rb:95:in `open'
C:/Users/ANAMIKA/.heroku/client/lib/heroku/jsplugin.rb:95:in `block in setup'
C:/Program Files (x86)/Heroku/ruby-2.1.7/lib/ruby/2.1.0/tmpdir.rb:88:in `mktmpdir'
C:/Users/ANAMIKA/.heroku/client/lib/heroku/jsplugin.rb:63:in `setup'
C:/Users/ANAMIKA/.heroku/client/lib/heroku/cli.rb:42:in `start'
C:/Program Files (x86)/Heroku/bin/heroku:29:in `<main>'
! 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: Permission denied # rb_sysopen - C:\Users\ANAMIKA\AppData\Local/heroku/cli/lib/node.exe (Errno::EACCES)
Command: heroku create
Version: heroku/toolbelt/3.99.3 (i386-mingw32) ruby/2.1.7
More information in C:/Users/ANAMIKA/.heroku/error.log

this is saying that you need to update your heroku cli, here are the instructions
depending on the way you installed it, you can update it running
heroku update
or
sudo apt-get update && sudo apt-get upgrade heroku

Related

`gem install <package>` 404 Not Found, Error: Gem::RemoteFetcher::FetchError

I'm having a difficulty with RubyGem.
Environment
Windows 64-bit
Using Git-Bash in VSCode
Ruby 3.2.0 + devkit installed from rubyinstaller.org
Problem
run gem install bundler provides this error message:
$ gem install bundler -V
HEAD https://index.rubygems.org/
200 OK
GET https://index.rubygems.org/info/Kim/.local/share/gem/ruby/3.2.0
404 Not Found
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
bad response Not Found 404 (https://index.rubygems.org/info/Kim/.local/share/gem/ruby/3.2.0)
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/remote_fetcher.rb:232:in `fetch_http'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/remote_fetcher.rb:248:in `fetch_path'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/resolver/api_set.rb:105:in `versions'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/resolver/api_set.rb:56:in `find_all'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/resolver/composed_set.rb:54:in `block in find_all'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/resolver/composed_set.rb:53:in `map'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/resolver/composed_set.rb:53:in `find_all'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/resolver/best_set.rb:30:in `find_all'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/resolver/installer_set.rb:170:in `find_all'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/resolver/installer_set.rb:61:in `add_always_install'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/dependency_installer.rb:322:in `resolve_dependencies'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/commands/install_command.rb:201:in `install_gem'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/commands/install_command.rb:226:in `block in install_gems'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/commands/install_command.rb:219:in `each'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/commands/install_command.rb:219:in `install_gems'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/commands/install_command.rb:167:in `execute'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/command.rb:323:in `invoke_with_build_args'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/command_manager.rb:185:in `process_args'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/command_manager.rb:149:in `run'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/gem_runner.rb:51:in `run'
C:/Ruby31-x64/bin/gem:21:in `<main>'
run gem env provides this error message:
$ gem env
ERROR: While executing gem ... (Gem::CommandLineError)
Unknown environment option [Kim/.local/share/gem/ruby/3.2.0]
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/commands/environment_command.rb:93:in `execute'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/command.rb:323:in `invoke_with_build_args'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/command_manager.rb:185:in `process_args'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/command_manager.rb:149:in `run'
C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/gem_runner.rb:51:in `run'
What could be the cause of this problem?
What steps can I follow to solve this issue?
Thanks.
These lines indicate that your shell environment is misconfigured:
GET https://index.rubygems.org/info/Kim/.local/share/gem/ruby/3.2.0
404 Not Found
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
bad response Not Found 404 (https://index.rubygems.org/info/Kim/.local/share/gem/ruby/3.2.0)
You should instead see this:
HEAD https://index.rubygems.org/
200 OK
GET https://index.rubygems.org/info/bundler
200 OK
This line also indicates a misconfiguration:
Unknown environment option [Kim/.local/share/gem/ruby/3.2.0]
This is most likely caused by the gemrc or .gemrc file having incorrect contents. The location of this file on Windows varies so I would recommend looking in the following locations for it:
%USERPROFILE% (typically C:\Users\<your username>
C:\ProgramData
C:\Ruby31-x64
If you can't find the file in any of those locations then perform a search of C:\ to find it.
Once you've found it you can either edit the file to remove the invalid values or you can delete it entirely. (or more preferably, rename it so that you can restore it if necessary)

Installing Ruby on Godaddy Shared Hosting

I'm trying to use Linuxbrew to manage my dependencies; however, when I attempt to install I receive an error.
Error: No such file or directory - /usr/local/bin/rub
I have attempted to install using the source files and running
./configur-prefix=$Home/env
make
make install
which gives the following report:
installing binary commands: /env/bin
/home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:226:in `mkdir': Permission denied # dir_s_mkdir - /env (Errno::EACCES)
from /home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:226:in `fu_mkdir'
from /home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:207:in `block (2 levels) in mkdir_p'
from /home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:205:in `reverse_each'
from /home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:205:in `block in mkdir_p'
from /home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:191:in `each'
from /home/tmiles199/downloads/ruby-2.4.1/lib/fileutils.rb:191:in `mkdir_p'
from ./tool/rbinstall.rb:194:in `makedirs'
from ./tool/rbinstall.rb:306:in `prepare'
from ./tool/rbinstall.rb:344:in `block in <main>'
from ./tool/rbinstall.rb:822:in `block in <main>'
from ./tool/rbinstall.rb:819:in `each'
from ./tool/rbinstall.rb:819:in `<main>'
make: *** [do-install-all] Error 1
Godaddy does not allow sudo or su access. The server info
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)
I need Homebrew to install xz and glibc before I can install Ruby, or update the gcc version. Unfortunately, both produce the first error.
Could anyone help me install this package? My real endgoal is updating gcc through brew.
You don't have needed permissions to do that in the shared hosting:
in `mkdir': Permission denied # dir_s_mkdir - /env (Errno::EACCES)
When you try to create the directory, the installation fails.
You need a VPS, a dedicated server or a shared hosting preconfigurated.
I have found out a workaround for this issue to be able to install homebrew without root and sudo access.
Just follow the instruction on the Alternative Installation section of brew.sh and it will wonderfully work with no mayor issues at all.
This option will not work if you do not meet the minimum requirements regarding the glibc version.

Ruby on rails on Jailed shell cpanel on centos

I am trying to install ruby on rails on a shared server with Cpanel with Jailed Shell on SSH.
I've this
-jailshell: rbenv: command not found
when server is starting.
After downloading the Ruby tar package, I navigated inside the folder and ran the commands,
make
and
make install
and
./configure --prefix=/usr/local/ruby -exec-prefix=/usr/local/ruby
once and it didn't work
tried even this
./configure --prefix=/usr/local/ -exec-prefix=/usr/local/
the command make install results in the following
Permission denied # dir_s_mkdir - /usr/local/ruby (Errno::EACCES)
from /home/username/ruby-2.1.1/lib/fileutils.rb:247:in `fu_mkdir'
from /home/username/ruby-2.1.1/lib/fileutils.rb:224:in `block (2 levels) in mkdir_p'
from /home/username/ruby-2.1.1/lib/fileutils.rb:222:in `reverse_each'
from /home/username/ruby-2.1.1/lib/fileutils.rb:222:in `block in mkdir_p'
from /home/username/ruby-2.1.1/lib/fileutils.rb:208:in `each'
from /home/username/ruby-2.1.1/lib/fileutils.rb:208:in `mkdir_p'
from ./tool/rbinstall.rb:193:in `makedirs'
from ./tool/rbinstall.rb:300:in `prepare'
from ./tool/rbinstall.rb:339:in `block in <main>'
from ./tool/rbinstall.rb:789:in `call'
from ./tool/rbinstall.rb:789:in `block in <main>'
from ./tool/rbinstall.rb:786:in `each'
from ./tool/rbinstall.rb:786:in `<main>'
make: *** [do-install-all] Error 1
My service provider says it's the max level of access he can give me.
Tried installing it from CPANEL Ruby on rails installation. No luck from there either.
Any workarounds to install ruby, rvm and rails?
Thanks.
P.S. Tried a lot of methods posted online, no luck.

Vagrant installation librarian-chef command error No such file or directory # rb_sysopen

I am trying to install vagrant. When I am trying to run a command librarian-chef install I am facing an Error. I am pasting the error below.
/home/saiteja/.rvm/gems/ruby-2.2.3/gems/librarian-0.1.2/lib/librarian/dsl/receiver.rb:29:in `read': No such file or directory # rb_sysopen - /home/saiteja/Cheffile (Errno::ENOENT)
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/librarian-0.1.2/lib/librarian/dsl/receiver.rb:29:in `run'
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/librarian-0.1.2/lib/librarian/dsl.rb:79:in `block in run'
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/librarian-0.1.2/lib/librarian/dsl.rb:73:in `tap'
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/librarian-0.1.2/lib/librarian/dsl.rb:73:in `run'
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/librarian-0.1.2/lib/librarian/dsl.rb:17:in `run'
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/librarian-0.1.2/lib/librarian/environment.rb:148:in `dsl'
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/librarian-0.1.2/lib/librarian/specfile.rb:15:in `read'
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/librarian-0.1.2/lib/librarian/action/resolve.rb:13:in `run'
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/librarian-0.1.2/lib/librarian/cli.rb:169:in `resolve!'
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/librarian-chef-0.0.4/lib/librarian/chef/cli.rb:41:in `install'
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block (2 levels) in bin!'
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/librarian-0.1.2/lib/librarian/cli.rb:31:in `returning_status'
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block in bin!'
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/librarian-0.1.2/lib/librarian/cli.rb:47:in `with_environment'
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `bin!'
from /home/saiteja/.rvm/gems/ruby-2.2.3/gems/librarian-chef-0.0.4/bin/librarian-chef:7:in `<top (required)>'
from /home/saiteja/.rvm/gems/ruby-2.2.3/bin/librarian-chef:23:in `load'
from /home/saiteja/.rvm/gems/ruby-2.2.3/bin/librarian-chef:23:in `<main>'
from /home/saiteja/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
from /home/saiteja/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'
I googled it. I understood that it is some kind of path error. But I checked the path .rvm/* that is shown in error.
Any help is appreciated. Thank you.
The problem is that , we first need to install vagrant. Then we need to clone the project we need to work on git clone http://-----.There we need to perform vagrant up and vagrant ssh.
Now we are in the vagrant environment. Here we need to install our rails and ruby in order to work with the project independent of our local system (Here persons working on the same project must install same versions of them in order to work).
Perform the installation of ruby through rvm (or) rbenv and install rails. Then we need to use the command librarian-chef install, then it installs all the required gems to the directory you are working without any problem.

Having difficulty in generating a local server in an already existing web project using Jekyll

I just downloaded a blog model in github and want to do some modification myself. so I ran
$ jekyll build
but faild to generate the local server, the error message is listed below:
mywebsite git:(gh-pages) ✗ jekyll build
Configuration file: /Users/phoenix/Documents/script/mywebsite/_config.yml
/usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- jekyll-paginate (LoadError)
from /usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/lib/jekyll/plugin_manager.rb:30:in `block in require_gems'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/lib/jekyll/plugin_manager.rb:27:in `each'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/lib/jekyll/plugin_manager.rb:27:in `require_gems'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/lib/jekyll/plugin_manager.rb:19:in `conscientious_require'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/lib/jekyll/site.rb:97:in `setup'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/lib/jekyll/site.rb:49:in `initialize'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/lib/jekyll/commands/build.rb:30:in `new'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/lib/jekyll/commands/build.rb:30:in `process'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/bin/jekyll:17:in `<top (required)>'
from /usr/local/bin/jekyll:23:in `load'
from /usr/local/bin/jekyll:23:in `<main>'
but when I ran
$ jekyll new newsite and jekyll server, it works just fine.
My os is OS X 10.11, Jykell 3.0.1, can anyone tell my how to generate a local server in an already exists directory?
Okay, I found a solution myself. I followed the instructions from this site:
http://www.blogways.net/blog/2013/04/08/install-jekyll-on-mac.html
for those who can't read Chinese, I run the following commands in terminal:
$export PATH=/usr/local/opt/ruby/bin:$PATH
$gem install jekyll rdiscount RedCloth
$gem install github-pages
now it works. But I am still not sure what exactly went wrong, I guess it was that I missed some module for Markdown or it was the ruby path issue..

Resources