Hot answers tagged

23

I found these notes on Waynes blog, http://wayneeseguin.beginrescueend.com/ Basically, adding: export rvm_trust_rvmrcs_flag=1 to ~/.rvmrc will bypass the check. There is also rvm rvmrc <command> [dir] for manually trusting/untrusting .rvmrc files. Looking for the same thing so thought I'd post the solution. HTH Regards, Phil


19

Updates Chef version is 0.10.8 The Chef Wiki has gone through a lot of revision since this was originally asked. The Opscode Platform is now called Opscode Hosted Chef Chef will soon be distributed as a full-stack installation, in addition to RubyGems and Debian packages. Vagrant is a great way to get started using Chef. Original response follows First, ...


13

After rvm pkg install libyaml, reinstall ruby 1.9.3 by: rvm reinstall 1.9.3 --with-libyaml-dir=/home/rails/.rvm/usr credit: http://stackoverflow.com/a/12882906/88597


11

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 ...


10

There is a file in the build directory called .installed.list. This appears to be a list of all the files that get installed.


8

Why not using remote_directory resource. It's intended exactly for that. See: http://docs.opscode.com/resource_remote_directory.html


7

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"


7

I picked little a different solution from SpamapS's.. I'm also running an app with preload_app = true, managed by Upstart. When I was looking to solve this problem myself, I'd been using Upstart's "exec" to start my app ("exec bundle exec unicorn_rails blah blah"). Then I found your question, and it made me realize that instead of using Upstart's "exec" to ...


7

Well, in the meantime, I figured this one out. Since there was no concise writeup on this subject, here is the beginning of one. When I have all the bugs ironed out I'll submit this to some tutorial sites. Make sure that the base fastcgi apache module is installed. If you use ArchLinux as I do, mod_fcgid on the aur works. In other distributions, install ...


7

As Jeff made me notice that Ruby 1.8.7 has not been backported yet, the other only solution that comes to my mind is to use the PPA of the team packaging Ruby. There you can find both Ruby version 1.8.7.22 and version 1.9.0.2, should you prefer. If you don't know how to configure ubuntu to use a PPA, the instructions are also on the linked page (click on ...


7

Is this what you're after? #!/bin/bash # Source hostname from command. echo "Hostname is $(hostname)" # Set hostname as string. HOSTNAME="somestring" echo "Hostname is ${HOSTNAME}"


6

You can configure how many Rails processes Apache/passenger spawns. For your size (3 concurrent requests) you should be fine with 2 rails processes: Set these in your apache config: PassengerMaxPoolSize 2 PassengerMaxInstancesPerApp 2 The MaxPoolSize determines how many instances can be started maximally, the MaxInstancesPerApp determines how many ...


6

Apache will still serve static files, but it will only serve them once. Perhaps the easiest way is to configure varnish to listen on all IP addresses for port 80, and configure Apache to listen to on localhost:8000 for example. Then you configure varnish to forward all requests it receives to localhost:8000 for Apache to handle. I would go with a varnish ...


6

Late, but: http://ericholscher.com/blog/2010/nov/8/building-django-app-server-chef/ When I started looking at Chef, I found it incredibly complex and lacking in fundamental documentation. This is going to be my experience understanding Chef while setting up a single server. This strategy can be used across multiple servers, with a little tweaking.


6

There's an excellent guide on: https://github.com/tecnh/gollum/wiki/Gollum-and-Passenger The main points are: add a config.ru to lib/gollum/frontend Point your document root to lib/gollum/frontend/public Use the following config.ru as a base, set wiki path accordingly (I had to add the bundler setup part) #!/usr/bin/ruby require 'rubygems' require ...


6

You probably have to install RubyGems. Try: yum install rubygems If it fails, try installing it by hand: wget http://rubyforge.org/frs/download.php/74922/rubygems-1.8.4.tgz tar xzpvf rubygems-1.8.4.tgz cd rubygems-1.8.4 ruby setup.rb


6

UNIX domain sockets are for local connections only. Exporting the file-system that they are on to another machine won't make that socket accessible over the network. See the Wikipedia article on Unix domain sockets for a little more information.


6

That's not a configuration option, it's a Ruby code snippet that tells it to set copy_on_write_friendly if the GC object has that method. For example, in ruby mainline 1.9.2p290: 1.9.2p290 :003 > GC.copy_on_write_friendly NoMethodError: undefined method `copy_on_write_friendly' for GC:Module from (irb):3 from ...


6

It's up to you whether you want to disable it or not. If you do nothing else, it'll be gone if/when you reboot. If you want it permanent, you'll have to add it to /etc/fstab. If you do want to disable it: sudo swapoff /swap


6

The best practise is to put any facts and other plugins within modules on the puppet server. Then use the pluginsync feature on the client. This lets the puppet client put things in the appropriate location. http://docs.puppetlabs.com/guides/plugins_in_modules.html {modulepath} └── {module} └── lib |── augeas │ └── lenses ...


6

If your package manager installed Ruby to begin with, then something on your system needs it. The easiest way to find out what needs it is to test an attempt to remove the package. For instance: # yum remove ruby ... ================================================================================ Package Arch Version Repository ...


5

You are using gems with native extensions, but they were compiled against libraries on the source system that have different versions on the target system. So you need to rebuild your gems on the target system. rvm use 2.0.0-p353 gem pristine --all In future it's better if you just deploy your source code and let bundler handle the gems on the target ...


5

You are dealing with AFS, which is a networked file system. I suspect that you are probably bumping into a quota limit. You will need to work with the administrator of that service.


5

Create the file "config.ru", add this to it: require "gollum/frontend/app" Precious::App.set(:gollum_path, File.dirname(__FILE__)) Precious::App.set(:wiki_options, {}) run Precious::App


5

Probably a bit long in the tooth now, but as of 1.16 rvm supports downloading pre-compiled binaries. I was having difficulty when I asked for the head version (ie 1.9.3) 20130212 00:31:00 dev@domU-xxxx:~ rvm install 1.9.3 Searching for binary rubies, this might take some time. No binary rubies available for: ubuntu/12.04/i386/ruby-1.9.3-p385. Continuing ...


5

Yes, you can su to any user in a script as root without requiring a password. This is a bit of a hack, but it will work. You might have some hiccups along the way (your environment changes when you su, for instance), but you'll be able to make it work. I don't think it's "right". Also, root can do everything, so you can always find a way to do everything as ...


4

FastCGI is a replacement for "standard" CGI scripts. In old-school CGI, the web server would start up your script, send it a request, wait for a response, then expect your script to terminate. FastCGI's main feature is that your script doesn't die, but hangs around, waiting for another request. This makes it far more efficient because another process is ...


4

The tool Vmware offers for this is the VMware Infrastructure Remote Command Line. (Download & Docs) See Importing the RCLI Appliance


4

If you need an alert when your site goes down you should consider an online service for notifications: They will see the outside perspective. If you monitor from "inside your own box" you will never get an email if it crashes completely or looses its network connectivity because your script will not be able to run or alert you anymore. Bello or Pingdom ...


4

You shouldn't install software this way. Removing software which was installed like this may be dangerous: unpack the same ruby to /tmp run: ./configure --prefix=/tmp/somedir # by default prefix points to /usr/local make make install # this will install ruby in /tmp/somedir instead of where you've installed it cd /tmp/somedir ...



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