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.
Related
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.
I'm getting an error each time I attempt to use gem install sass (or gem install anything, really).
/usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91:in `read': Permission denied - /usr/lib/ruby/gems/1.8/specifications/passenger-3.0.18.gemspec (Errno::EACCES)
from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:91:in `load_specification'
from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:153:in `load_gems_in'
from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:152:in `each'
from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:152:in `load_gems_in'
from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:149:in `reverse_each'
from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:149:in `load_gems_in'
from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:345:in `refresh!'
from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:78:in `from_gems_in'
from /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:58:in `from_installed_gems'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:883:in `source_index'
from /usr/lib/ruby/site_ruby/1.8/rubygems/gem_path_searcher.rb:81:in `init_gemspecs'
from /usr/lib/ruby/site_ruby/1.8/rubygems/gem_path_searcher.rb:13:in `initialize'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:841:in `new'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:841:in `searcher'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:840:in `synchronize'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:840:in `searcher'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:479:in `find_files'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:983:in `load_plugins'
from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:1139
from /usr/bin/gem:8:in `require'
from /usr/bin/gem:8
Because this is a shared host, I don't have access to /usr/lib/ruby. I contacted a2hosting but they told me they don't support Ruby on Rails and to post about it here. So I guess that's an indication that there is some way to fix it myself? There is a RubyGems app on the a2hosting CPanel, but it doesn't work either:
I suspect this is because it just uses the same commands I'm using, and thus throws the same error.
I have installed rvm on the server, however. Perhaps there is a workaround using that?
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.
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..
While trying to install refinery, a rails app, I keep getting the following error:
ESL#new-host-2 ~$ refinerycms /Application/MAMP/htdocs/goodwatching
create
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:247:in `mkdir': Permission denied - /Application (Errno::EACCES)
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:247:in `fu_mkdir'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:221:in `block (2 levels) in mkdir_p'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:219:in `reverse_each'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:219:in `block in mkdir_p'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:205:in `each'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/fileutils.rb:205:in `mkdir_p'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:51:in `block in invoke!'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:133:in `call'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:133:in `invoke_with_conflict_check'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:50:in `invoke!'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/actions.rb:95:in `action'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/actions/empty_directory.rb:15:in `empty_directory'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.13/lib/rails/generators/app_base.rb:103:in `create_root'
from (eval):1:in `create_root'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `block in invoke_all'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `each'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `map'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/invocation.rb:126:in `invoke_all'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/group.rb:238:in `dispatch'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/base.rb:425:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/refinerycms-2.0.10/bin/refinerycms:30:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/refinerycms:23:in `load'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/refinerycms:23:in `<main>'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
I've seen a couple similar questions but the resolution always seems to be that target directory either doesn't exist or is owned by root. I've checked and my directory exists, is owned by me and has permissions 755.
update
I tried a lot of things so I'm not 100% sure this is relevant, but I updated rvm and then I was able to run refinercyms goodwatching from inside the original /goodwatching directory. But now I'm getting this multiple times when I run it:
NoMethodError: private method `open' called for Gem::Package:Class
An error occured while installing rake (10.0.4), and Bundler cannot continue.
Make sure that `gem install rake -v '10.0.4'` succeeds before bundling.
When I run gem install rake -v '10.0.4' it does succede, but then I get the same error again immediately after.
Try to use sudo
sudo refinerycms /Application/MAMP/htdocs/goodwatching
UPDATE
try to remove Gemfile.lock
then
sudo gem update --system
sudo gem install bundler
sudo bundle install