I recently installed the gem rvm-capistrano in order to deploy in my server. First, I tried to run cap deploy:setup. It seems that installed RVM, but for some reasons (permissions or something else), it couldn't install REE:
Warning:
*** [err :: myserver.com] Failed to create the file ruby-enterprise-1.8.7-2012.02.tar.gz
[...]
There was an error, please check /usr/local/rvm/log//*.log. Next we'll try to fetch via http.
** [out :: myserver.com] Trying ftp:// URL instead.
I didn't include more because is irrelevant.
Obviously in deploy.rb sudo options is set as 'root'.
adduser #{user} rvm
Fixed it for me. Where #{user} is the name of your cap deploy user.
Related
I am new to vagrant.
I have installed virtualbox and vagrant(1.7.4) and then follow the book type
$> vagrant plugin install vagrant-cachier
After some minutes,it reported an error:
> vagrant plugin install vagrant-cachier
Installing the 'vagrant-cachier' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:
An error occurred while installing childprocess (0.5.7), and Bundler cannot continue.
Make sure that `gem install childprocess -v '0.5.7'` succeeds before bundling.
Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run `bundle config disable_multisource true`.Gem::RemoteFetcher::FetchError: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server session ticket A (https://rubygems.org/gems/childprocess-0.5.7.gem)
I know little about ruby and gem.Is there anything else need to be installed before install plugins?
Or maybe the network issue? (I tried at home and office,the same error)
vagrant works fine that I can init, up and ssh normally.
I ran into the same issue finding it is a matter of gems folder misconfiguration.
I solved it with the following steps:
check where are your gems inside your vagrant installation (e.g. %vagrant_home%/embedded/gems/gems)
check your gem configuration with the command gem environment and looking for the section named GEM PATHS (if gem is not in you path look for it under the vagrant installation folder, e.g. %vagrant_home%/embedded/bin)
if the path at point 1 is not present within the section at point 2, include it with the command export GEM_HOME=/path/to/gems/folder (e.g. export GEM_HOME=%vagrant_home%/embedded/gems/gems)
P.S. %vagrant_home% refers to the vagrant installation base folder, use set instead of export under windows ...and sorry if I mixed unix and windows syntaxes
Test Environment: Vagrant 1.8.1 (gem 2.4.5.1) on Windows 7 behind web proxy
I installed this plugin https://github.com/winnfsd/vagrant-winnfsd and now Vagrant Cachier works like a charm on Windows 10.
To run it on Ubuntu simply install the nfs-server
https://stackoverflow.com/a/52361432/1679541
I am using Capistrano and I would like to have a system gem install (instead of deployment which is default). I have tried the following:
set :bundle_flags, '--system'
However I get the following error:
You have specified both a path to install your gems to, as well as --system. Please choose.
Is there a way to set system install?
I am using Capistrano 2.15.5.
I am trying to setup rake via this doc.
http://octopress.org/docs/setup/
But I get some errors.
ikhthiandor#ikhthiandor-Satellite-L450:/opt/octopress$ rake install
## Copying classic theme into ./source and ./sass
mkdir -p source
rake aborted!
Permission denied - source
Tasks: TOP => install
(See full trace by running task with --trace)
With sudo I get this output.
ikhthiandor#ikhthiandor-Satellite-L450:/opt/octopress$ sudo rake install
rake aborted!
no such file to load -- bundler/setup
(See full trace by running task with --trace)
Here is a list of files in the directory.
ikhthiandor#ikhthiandor-Satellite-L450:/opt/octopress$ ls -a
. config.ru .git Rakefile .slugignore
.. _config.yml .gitignore .rbenv-version .themes
CHANGELOG.markdown Gemfile plugins README.markdown
config.rb Gemfile.lock .powrc .rvmrc
How can I solve the problem?
Ikhthiandor: Looks like you are a beginner in the ruby/rails world.
By running the rake install command, you are installing the default octopress theme using the rake tool. Not trying to setup rake as you mention in the question.
The first error ( Permission denied - source when trying mkdir -p source - as you correctly guessed - is because the user doesn't have permissions to create that directory.
The second error ( no such file to load -- bundler/setup ) is because the previous install dependencies steps are not performed correctly (for the user running this command).
The install dependencies steps to be completed successfully are:
1. gem install bundler
2. rbenv rehash # If you use rbenv, rehash to be able to run the bundle command
3. bundle install
I am guessing you ran these steps successfully as 'ikhthiandor' user, so the bundler gem is not available for the 'sudo' user.
You can fix this by either of the following options:
changing permissions on /opt/octopress folder so that 'ikhthiandor' user has rights to create sub-folders/files within.
Run all the commands in the Octopress Setup doc as 'sudo'
Best practice would be to use either rvm or rbenv to manage custom installations of ruby environments per user (and not do everything as super user).
If you are indeed a fresher in the ruby-rails world, and want to step up your knowledge of the tools and the best practices in the ruby/rails world, I suggest browsing through the first few chapters of the Ruby on Rails Tutorial book that is available for free on-line.
HTH
I followed every step described in Redmine installation page and in this article.
I put the following path in environment.rb:
ENV['GEM_PATH'] = '/home/myusername/ruby/gems/gems:/usr/lib64/ruby/gems/1.8'
I tried the following path too:
ENV['GEM_PATH'] = '/home/myusername/ruby/gems:/usr/lib64/ruby/gems/1.8'
Still there is an error when I'm trying to execute the command
RAILS_ENV=production rake config/initializers/session_store.rb
Error message is the following:
Missing the i18n 0.4.2 gem. Please `gem install -v=0.4.2 i18n`
Although gem is there with the specific verison.
Any idea?
try with this
export GEM_HOME=$HOME/ruby/gems/
Bye.
did you set those environment variables and install the gems there, I assume?
we tried to install rake on our pc but there were following errors.. We even tried updating gems but in vain. We need to run some tasks on rake and dont know how to go abt it.
C:\Documents and Settings\nemanich\My Documents\gems>gem install rake-compi 0
.7.0.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: Error installing rake-compiler-0.7.0.gem:
rake-compiler requires RubyGems version >= 1.3.5
C:\Documents and Settings\nemanich\My Documents\gems>gem install update_rubygems
.gem
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: could not find gem update_rubygems.gem locally or in a repository
Are you behind a proxy server? If so, set your HTTP_PROXY environment variable appropriately. This is the sort of error you get when the repository can't be contacted. For example:
set HTTP_PROXY=http://proxy.mycompany.com:8888
will set it temporarily.
I don't think that's the command to update RubyGems. Have you tried gem update --system? You might be able to install Rake after that.