Weird Rails Error "Permission Denied: Bin/Rails" for Old Rails Apps

Weird rails error permission denied: bin/rails for old rails apps

In the directory you mentioned is your rails in executable mode. If not you can apply

chmod u+x bin/rails

and make it executable.

Permission denied error with RVM

I had this same problem and I resolved it by doing the following:

sudo mkdir ~/.gem/specs
sudo chmod 777 ~/.gem/specs

It seems that RVM was trying to create this "specs" folder, but didn't have permissions to do so.

Uninstalled old version of rails and now no longer have rails executable

This issue has been resolved through Nitrous support channels. Somehow the file /home/action/.rvm/gems/ruby-2.0.0-p247/bin/rails was missing, and gem install rails did not add it. Manually adding this file with the following contents solved the issue.

#!/usr/bin/env ruby_noexec_wrapper
#
# This file was generated by RubyGems.
#
# The application 'railties' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'rubygems'

version = ">= 0"

if ARGV.first
str = ARGV.first
str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
if str =~ /\A_(.*)_\z/
version = $1
ARGV.shift
end
end

gem 'railties', version
load Gem.bin_path('railties', 'rails', version)


Related Topics



Leave a reply



Submit