Tag Info

Hot answers tagged

10

You can install it with default yum install -y ruby ruby-devel rubygems Other way is to compile it by yourself Ruby wget http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p302.tar.gz tar -zxvf ruby-1.8.7-p302.tar.gz cd ruby-1.8.7-p302 ./configure --with-openssl-dir=/usr/lib/openssl make make install Rubygems wget ...


8

Either gem -v or gem --version would output the version number. For more information: $ gem -h RubyGems is a sophisticated package manager for Ruby. This is a basic help message containing pointers to more information. Usage: gem -h/--help gem -v/--version gem command [arguments...] [options...] Examples: gem install rake gem ...


7

Note that, in your third command, your shell expands $PATH before sudo gets to see it, and so the output is your shell's path, not the PATH that sudo sees. What you want is something like sudo echo \$PATH or sudo sh -c 'echo $PATH'. Beyond that, take a look at the SECURITY NOTES section of the sudo(8) man page. I believe that Ubuntu builds sudo with the ...


5

Same here. Try this path: /usr/local/rvm/rubies/ruby-1.9.2-p180/etc/gemrc To get the path: $ irb >> require 'etc' >> Etc.sysconfdir => "/usr/local/rvm/rubies/ruby-1.9.2-p180/etc"


4

You just have to register AdminUser as a manageable resource: $> rails generate active_admin:resource AdminUser Then, just customize the whole thing but remember that both 'password' and 'password_confirmation' field have to be present in the form if you want to be able to manipulate passwords - you decide if that's a good idea. I did it like this but ...


4

One thing to keep in mind is that updates will happen much faster using gem than they will to the official apt repositories. Perhaps there are third party repositories that are more up-to-date, I'm not sure. However, my impression is that if you need bleeding-edge newness, then update using gem.


4

I don't use apt-get, as I run NetBSD, but "pkgsrc" has a similar role as apt-get. My local policy is very simple. If I can use a gem, I use a gem. If I cannot, I get it from pkgsrc. Some things which require native code (sqlite, a few others) simply do not reliably install as gems out of the box. The major benefit I see to using a gem for most things is ...


4

It sounds like you want to use puppet to provision servers in VMWare. "Cloning" is not the right word for this; "provisioning" is. You need to install Fog, a ruby cloud services library. This has nothing to do with FOG Project, a computer cloning solution. My guess is that you are confusing the two.


3

As far as Best Practices, I'd suggest hiring a SysAdmin to perform these functions and monitor your equipment. You needn't hire such a person full-time as there are many system administrators who offer these services on a contract basis for a certain number of hours per month. Failing that, I assume that this is something of a DevOps organization or a ...


3

My initial google searches were sounding like I'd have to install an older version of gcc and recompile ree using this older gcc. Then I found this blog post http://deadc.org/blog/2012/10/19/rvm-install-ruby-1-dot-8-7-with-gcc-4-dot-7/ Three lines from Thiago Silva: deadcow@jazz ~ $ rvm remove ree deadcow@jazz ~ $ export CFLAGS="-O2 -fno-tree-dce ...


3

Let's go by parts: gemname it runs my tool correctly. That's ok :) sudo gemname it merely tells me command not found. gemname is not in your $PATH sudo echo $PATH it does show the correct path. That's a cool one: variable expansion happens before bash runs the program. So when you run this, it expands to your user $PATH before calling sudo, so ...


3

nevermind... even though it says it failed, rvm install rubygems 1.4.2 has worked


2

Our policy is that we use gems when there's no debs "downstream" in the dependency chain (so usually customer-deployed and managed code), but everything we do ourselves is packaged properly and so we'll roll any dependent gems into debs to satisfy those dependencies. The different packaging systems shouldn't be a problem; your system management automation ...


2

I think you need the devel package for the mysql-client. Try to install it with: yum install mysql-devel


2

In future, if you have to install from tar.gz files, it's worth using the excellent "checkinstall" program, you just preceded the install command (whatever that might be) with "checkinstall", which will create a deb package and then install it. You might be able to reinstall rubygems now using checkinstall and then remove it immediately afterwards with dpkg ...


2

Here's what I did to remove rubygems installed from .tar.gz on a Ubuntu system: aptitude install checkinstall wget http://rubyforge.org/frs/download.php/69365/rubygems-1.3.6.tgz tar xfvz rubygems-1.3.6.tgz cd rubygems-1.3.6 checkinstall ruby setup.rb When asked, give it a name 'rubygems'. At this moment we have reinstalled the rubygems. Now we need to ...


2

The setup was missing gcc.


2

The root of the issue is that gems.rubyforge.org is the old gem server. It now redirects to the new one is at rubygems.org.


2

If you are looking at Rails as alternative to Python / Django it is likely that you already know virtualenv and why you want to use it. For Ruby and Rails I suggest you take a look at rvm and rbenv.


2

If you installed as your "normal" user account (didn't sudo), you most likely missed the warning message like this one: WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and /usr/bin aren't both writable. WARNING: You don't have /Users/jclark/.gem/ruby/1.8/bin in your PATH, gem executables will not run. Try this: export ...


2

It appears that the Chef Server is installed into a virtual machine created by Vagrant (/opt/vagrant_ruby). However, Chef Server 11+ is built on Erlang, not Ruby. It does come with Ruby, but you shouldn't use it directly. It's there for managing the Chef Server with chef-server-ctl. The installation in the Vagrant box above probably puts the various Ruby ...


2

I've run into similar issues before, and I'm about 99% sure your Ruby runtime is trying to load a version of OpenSSL other than the one it was built against, most likely due to the presence of a custom libssl in /usr/local. Can you do the following: Start an irb session with the Ruby runtime used to run Puppet, then require 'openssl' and leave the session ...


1

Alright, so I think I figured out what the deal was... It seems as though I was getting the uninitialized constant Gem::RemoteFetcher::OpenSSL error not because of an SSL issue, but because the source server could not be found. I was under the impression that the --source option was getting used, but I don't think it was (see below). As root on the Puppet ...


1

You can try downloading the curl .deb from the ubuntu package repository : http://packages.ubuntu.com/lucid/curl and installing it by hand with dpkg: dpkg --install /path/to/curl.deb If you're lucky, the requirements haven't changed too much and it will install without problems.


1

RubyGems 1.3.4 is the latest version. Generally, if you're going to use gems to install Ruby libraries, you'll want to run the latest possible version of it. If you're planning to install an RPM packaged version instead of the RubyGems-from-source, you should start by looking in /usr/local/lib/site_ruby and /usr/lib/ruby/gems. Software you install outside ...


1

You need to change the source on the puppet client, not the master.


1

The unfortunate answer is that OpenShift Origin does not currently support Rails4, both the broker and the console need to be upgraded from Rails3 to Rails4 and it's unfortunately non-trivial. As a side effect, OpenShift Origin does not at this time support Fedora 20 and instead is sticking with RHEL/CentOS 6 and Fedora 19 for now. However, there is ...


1

Since you are running the latest version of PostgreSQL, it seems very unlikely that it is really too old. I would look at the source code of whatever is generating that error and look for a bug in there. How is it calculating that PostgreSQL is "too old" ?


1

Your ruby gem is probably picking up the old development libraries. Typically you will to add /usr/pgsql-9.0/include/ to your includes.



Only top voted, non community-wiki answers of a minimum length are eligible