Codeship deployment error installing ruby? - ruby-on-rails

Not sure what it means or why it's happening, any advice appreciated massively.
arning! PATH is not properly set up, '/home/rof/.rvm/gems/ruby-1.9.3-p327/bin' is not at first place,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-1.9.3-p327'.
Unknown ruby string (do not know how to handle): ruby-1.9.3p545.
ruby-1.9.3p545 is not installed - installing.
Unknown ruby string (do not know how to handle): ruby-1.9.3p545.
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/12.10/x86_64/ruby-1.9.3p545.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for ubuntu.
Requirements installation successful.
Unknown ruby string (do not know how to handle): ruby-1.9.3p545.
Installing Ruby from source to: /home/rof/.rvm/rubies/ruby-1.9.3p545, this may take a while depending on your cpu(s)...
Unknown ruby string (do not know how to handle): ruby-1.9.3p545.
ruby-1.9.3p545 - #downloading ruby-1.9.3p545, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404 Not Found
The requested url does not exist(22): 'http://cache.ruby-lang.org/pub/ruby/./ruby-1.9.3p545.tar.bz2'
Checking fallback: http://ftp.ruby-lang.org/pub/ruby/./ruby-1.9.3p545.tar.bz2
Checking fallback: http://www.mirrorservice.org/sites/ftp.ruby-lang.org/pub/ruby/./ruby-1.9.3p545.tar.bz2
No fallback URL could be found, try increasing timeout with:
echo "export rvm_max_time_flag=20" >> ~/.rvmrc
There has been an error fetching the ruby interpreter. Halting the installation.
Gemset '' does not exist, 'rvm ruby-1.9.3p545 do rvm gemset create ' first, or append '--create'.
Seems like nothing it working to get my app launched on heroku - I was launching it through github push.
The app can be found # www.github.com/cjshort/devonite
Thanks.

I'm one of the founders of Codeship.
It looks like you're using a Ruby version that is currently not supported on Codeship. Could you send us an in-app support request with more info so we can take a look at your build directly.

Related

Anyone else get this error "Error: invalid option: --with-passenger"

Can not get NGINX to install with passenger
Following the steps you are supposed to...
brew install passenger
Then you run the following command...
brew install nginx --with-passenger
But I get:
Error: invalid option: --with-passenger
Could not find any resources about this online, so asking here.
$ brew install nginx --with-passenger
Usage: brew install [options] formula
Install formula.
formula is usually the name of the formula to install, but it can be specified
in several different ways.
-d, --debug If brewing fails, open an interactive
debugging session with access to IRB or a
shell inside the temporary build directory
--env If std is passed, use the standard build
environment instead of superenv.If super
is passed, use superenv even if the formula
specifies the standard build environment.
--ignore-dependencies Skip installing any dependencies of any
kind. If they are not already present, the
formula will probably fail to install.
--only-dependencies Install the dependencies with specified
options but do not install the specified
formula.
--cc Attempt to compile using provided
compiler. compiler should be the name
of the compiler's executable, for instance
gcc-7 for GCC 7. In order to use LLVM's
clang, use llvm_clang. To specify the
Apple-provided clang, use clang. This
parameter will only accept compilers that
are provided by Homebrew or bundled with
macOS. Please do not file issues if you
encounter errors while using this flag.
-s, --build-from-source Compile the specified formula from source
even if a bottle is provided. Dependencies
will still be installed from bottles if
they are available.
--force-bottle Install from a bottle if it exists for the
current or newest version of macOS, even if
it would not normally be used for
installation.
--include-test Install testing dependencies required to
run brew test.
--devel If formula defines it, install the
development version.
--HEAD If formula defines it, install the HEAD
version, aka. master, trunk, unstable.
--fetch-HEAD Fetch the upstream repository to detect if
the HEAD installation of the formula is
outdated. Otherwise, the repository's HEAD
will be checked for updates when a new
stable or development version has been
released.
--keep-tmp Don't delete the temporary files created
during installation.
--build-bottle Prepare the formula for eventual bottling
during installation.
-f, --force Install without checking for previously
installed keg-only or non-migrated
versions.
-v, --verbose Print the verification and postinstall
steps.
--display-times Print install times for each formula at the
end of the run.
-i, --interactive Download and patch formula, then open a
shell. This allows the user to run
./configure --help and otherwise
determine how to turn the software package
into a Homebrew package.
-g, --git Create a Git repository, useful for
creating patches to the software.
-h, --help Show this message.
Error: invalid option: --with-passenger
This is supposed to work... so yeah.
A late answer. Obviously the documentation on the passenger site is outdated at time of this writing.
According to phusion's github site
https://github.com/phusion/passenger/issues/2187#issue-416881033
the config option --nginx-with-passenger is not valid anymore.
Instead do:
brew install nginx passenger
Addendum:
When using google search for results currently the old page comes up at the top of the list. Here's the currently maintained page with the accurate information:
https://www.phusionpassenger.com/docs/advanced_guides/install_and_upgrade/nginx/install/oss/osx.html

Error installing Grails with GVM - Curl issue

I am having trouble installing Grails via GVM. I installed GVM via the instructions on GVM's website, and it appears it was installed correctly - restarting the terminal and running gvm help produces a list of possible commands. However, when I go to install Grails (or Groovy), I get the following output in the terminal:
$ gvm install grails
Downloading: grails 2.3.2
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (1) Protocol [http not supported or disabled in libcurl
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of /Users/neilpoulin/.gvm/archives/grails- 2.3.2.zip or
/Users/neilpoulin/.gvm/archives/grails-2.3.2.zip.zip, and cannot find /Users/neilpoulin/.gvm/archives/grails-2.3.2.zip.ZIP, period.
Stop! The archive was corrupt and has been removed! Please try installing again.
I looked to make sure zip, unzip and curl were found:
$ which zip
/usr/bin/zip
$ which unzip
/usr/bin/unzip
$ which curl
/usr/bin/curl
Prior to this, the only thing I have done with Grails/Groovy is to execute the example project include on the Grails website - http://grails.org/learn > step 2.
What am I missing here? is there some configuration of libcurl I need to change? Any help is much appreciated!
On investigation, it seems to be down to inconsistent versions (and behaviour) of MongoDB between our dev and prod environments. This was resulting in our prod server returning an array of urls on the download request (ie [theurl]). This was working perfectly on our dev environment, but started serving the array when the release was promoted to prod. Hope this is making sense!
I was having this problem persist— for me, it turned out that there were corrupt candidates caches by gvm during a previously failed install.
gvm flush candidates
set things back to rights, here.

Installing ruby on rvm error

I'm following the guide on rvm to install on OSX Leopard:
http://beginrescueend.com/rvm/install/
I have everything working up until I have to go
rvm install 1.9.2
however I start getting errors when I run that command:
summer$ rvm install 1.9.2-p290
Installing Ruby from source to: /Users/summer/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)...
ruby-1.9.2-p290 - #fetching
ruby-1.9.2-p290 - #downloading ruby-1.9.2-p290, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
ERROR: There was an error, please check /Users/summer/.rvm/log/ruby-1.9.2-p290/*.log. Next we'll try to fetch via http.
Trying http:// URL instead.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
ERROR: There was an error, please check /Users/summer/.rvm/log/ruby-1.9.2-p290/*.log
ERROR: There has been an error while trying to fetch the source.
Halting the installation.
ERROR: There has been an error fetching the ruby interpreter. Halting the installation.
UPDATE: in regard to Deryls response:
error after the modifications:
rvm install 1.9.2
Installing Ruby from source to: /Users/summer/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)...
ruby-1.9.2-p290 - #fetching
ruby-1.9.2-p290 - #downloading ruby-1.9.2-p290, this may take a while depending on your connection...
curl: option -: is unknown
curl: try 'curl --help' or 'curl --manual' for more information
ERROR: There was an error, please check /Users/summer/.rvm/log/ruby-1.9.2-p290/*.log. Next we'll try to fetch via http.
Trying http:// URL instead.
curl: option -: is unknown
curl: try 'curl --help' or 'curl --manual' for more information
ERROR: There was an error, please check /Users/summer/.rvm/log/ruby-1.9.2-p290/*.log
ERROR: There has been an error while trying to fetch the source.
Halting the installation.
ERROR: There has been an error fetching the ruby interpreter. Halting the installation.
UPDATE:
I removed the - at the end and got:
rvm install 1.9.2
Installing Ruby from source to: /Users/summer/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)...
ruby-1.9.2-p290 - #fetching
ruby-1.9.2-p290 - #downloading ruby-1.9.2-p290, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
ERROR: There was an error, please check /Users/summer/.rvm/log/ruby-1.9.2-p290/*.log. Next we'll try to fetch via http.
Trying http:// URL instead.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
ERROR: There was an error, please check /Users/summer/.rvm/log/ruby-1.9.2-p290/*.log
ERROR: There has been an error while trying to fetch the source.
Halting the installation.
ERROR: There has been an error fetching the ruby interpreter. Halting the installation.
I also tried both variation of using the - (or not) at the end with --insecure instead of k, I get similar errors.
Instead of modifying the rvm script, you can fix the root-cause of the issue by updating your ca-bundle.crt file. On certain Linux distros, the ca-bundle.crt file is way too old and thus doesn't know how to handle Github's SSL certificate.
What you can do is to locate the ca-bundle.crt on your system and then download and rename the cacert.pem from curl.haxx.se as ca-bundle.crt. Now the RVM installer script should work correctly.
This is what I did:
cp /etc/pki/tls/certs/ca-bundle.crt ~/ca-bundle.crt.old
sudo curl http://curl.haxx.se/ca/cacert.pem -o /etc/pki/tls/certs/ca-b
undle.crt
This machine is an EC2 instance, running CentOS 5 and managed with Rightscale. The location of your ca-bundle.crt on your system will probably be different, but there is only a few things Googling won't solve.
The version of curl on Leopard is outdated. Follow beijingyoung's steps listed here: https://github.com/mxcl/homebrew/issues/6103#issuecomment-1694558
You can also hand modify $rvm_path/scripts/fetch on line 61
fetch_command="curl -f -L --create-dirs -C - " # -s for silent
and change it to read
fetch_command="curl -f -L --create-dirs -C -k - " # -s for silent
What this does is tell curl not to care about any invalid certificates (you're not using one you had signed by a registered CA are you?) You can also add -s (as the # remark shows) in order to keep it quiet. Bear in mind that you will probably have to make this change again the next time you
rvm get head
to update your machine's RVM install. I will tale to Wayne about adding that as a permanent option if the detected platform is Leopard, however I do not believe this will go into the application as it creates a security concern for many users. (They prefer to see the errors and know there is a issue with certificates.)

Rails console running incredibly slowly when editing text

In one of my rails apps, the console has started running really slowly when i paste in text, type and (especially) delete text. I can see in top that irb is using lots of cpu. But i don't know how to diagnose this problem any further. It just started happening a couple of weeks ago. I'm wondering if it's possibly readline/wirble related? I use both of those.
I just tried it in another app, pasting in a block of text, and it seems just as bad - the text is appearing at the rate of one char a second! Maybe my command line history has filled up or something? How can i delete it? (for the rails console, not my bash command line history)
grateful for any advice - max
Edit - sorry, should have supplied some system details. Here you go:
System - Ubuntu 10.04
Ruby version - ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]
I just tried plain irb and i have the same problem. It might even be slower, it's pretty much ground to a halt halfway through the block of text i pasted in to test it.
I've rebooted many times (my laptop battery is knackered so i have to restart every time i unplug it anyway).
I'm not in a vm.
I have recently started using RVM (ruby version manager) and it seems to have coincided with that, though it might just be a coincidence. The problematic consoles are happening using system ruby, though, not an rvm.
Here's the output from ps aux | grep irb:
max 12583 0.0 0.0 1756 484 pts/7 S+ Apr11 0:00 sh -c irb -r irb/completion -r "/home/max/work/rails_apps/millionaire_container/millionaire/config/environment" -r console_app -r console_with_helpers --simple-prompt
max 12584 15.9 2.7 61872 56956 pts/7 S+ Apr11 158:26 irb
max 13981 64.4 0.9 20080 18708 pts/9 R+ 09:40 29:51 irb
max 14625 21.8 0.6 15020 12628 pts/12 Rl+ 10:25 0:20 irb
max 14757 0.0 0.0 3048 804 pts/13 R+ 10:27 0:00 grep --color=auto irb
It seems like rvm's readline is causing the slowness, put this line in your ~/.irbrc:
IRB.conf[:USE_READLINE] = false
Now try pasting something on irb. Is it fast? Good!
Only problem now is that you've lost the ability to edit your lines. We need to fix rvm's readline.
# assuming 1.8.6 is your rvm's default ruby version
rvm package install readline
rvm remove 1.8.6
rvm install 1.8.6 --with-readline-dir=$rvm_path/usr
Don't forget to edit out the IRB.conf line from your irbrc.
Simply using readline didn't help for me; there seems to be a deeper problem with libreadline, at least on OSX 10.7 where the select() system call waits for the timeout to expire before returning, even when there's data available.
My hack, which fixes this annoyance, is:
cd $rvm_path/src/readline-6.2
vi config.h
(change the line "#define HAVE_SELECT" -> #undef HAVE_SELECT)
make install
I ran into the same issue using REE on Ubuntu 12.04 and tried all the solutions listed here without any success. The final working solution for me was:
apt-get remove libreadline6-dev
apt-get install libreadline-gplv2-dev
rvm remove 1.8.6
rvm install 1.8.6
The issue appears to be a minor incompatibility with libreadline6-dev. When libreadline6-dev was present on the machine, it would be used when compiling Ruby, and the problem would occur. This would happen regardless of the --with-readline-dir options passed when compiling ruby. Unfortunately, in the latest version of Ubuntu, there is no libreadline5-dev, but there is libreadline-gplv2-dev.
FWIW the fix suggested by #fl00r does indeed work. For me, this new behavior appears to correlate with installing the Snow Leopard 10.6.7 update. It happens in both IRB and Rails Console.
Another thing that seems to work for me is to make sure the last line of the pasted test includes a "naked" newline character.
This is definitely new behavior and it is very annoying.
I see it on OS X too. #fl00r's fix works (hitting any key while the paste is trying to, um, paste.) #jesvs fix works and is permanent.

RVM ERRORS - unable to clone RVM repository

I am trying to install RVM, but I get this error.
Last login: Thu Mar 31 15:41:06 on ttys000
G-Mac-5:~ macbookpro$ bash < <(curl -B http://rvm.beginrescueend.com/install/rvm)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5335 100 5335 0 0 7948 0 --:--:-- --:--:-- --:--:-- 14113
bash: line 114: git: command not found
bash: line 115: git: command not found
ERROR: Unable to clone the RVM repository, attempted both git:// and https://
Do I need to install GIT first? And whats the diffrents between zsh and bash?
There really should be better diagnostic messages when something about the installation fails. Phusion Passenger is an example of how to do it right, where not only are rigorous tests done prior to the installation attempt, but any problems are explained with cut-and-pasteable examples on how to fix them. They're even customized to the particular OS you're using, differentiating between apt-get and yum among other things.
If you're missing git, you won't get very far with rvm.

Resources