Tag Info

Hot answers tagged

21

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


12

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


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


9

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


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}"


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


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

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

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

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

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

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


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

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 distrobutions, install ...


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


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"


5

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


4

It sounds like your application needs better design and lacks appropriate parallelism unless you're actually rendering those pages in some way, and even then I think you should be able to surpass 8 per second if you uncouple the downloading from the final render -- interactivity is not a priority. You are best served by ensuring proper parallelism in your ...


4

Try RMagick instead of rmagick: $ irb irb(main):001:0> require 'RMagick' => true irb(main):003:0> puts Magick::Long_version This is RMagick 2.13.1 ($Date: 2009/12/20 02:33:33 $) Copyright (C) 2009 by Timothy P. Hunter Built with ImageMagick 6.6.8-5 2011-07-08 Q16 http://www.imagemagick.org Built for ruby 1.8.7 Web page: http://rmagick.rubyforge.org ...


4

I don't know where you searched, but all information can be found on puppet docs site. You can add stuff in all sort of ways to Puppet. There are four main categories which are: Custom facts Custom functions Custom resources Custom providers (also same link as resources) There's even a complete example of new resources.


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

I found the solution to this problem. It turns out that there were messages that I missed in my logfile that were indicating that the startup process of the new child failed. The reason for this failure is that I did not declare unicorn in my Gemfile. For some reason, it seems that it is possible to start unicorn from the command line without unicorn ...


4

The answer on this always comes down to 'use what you know'. Depending on the purpose I regularly script in over half a dozen different languages. Most of the folks here will likely say the same.


4

Problem FATAL: Ident authentication failed for user "tent" Postgres is trying to use ident authentication, and it's not working as expected. Solution Read the Postgres manual, specifically the section on pg_hba.conf and the section on ident authentication. Either of the following Realize ident authentication is not what you want and configure ...


4

looks like you specify some settings in ~/.gemrc: - "gem" => "--remote --gen-rdoc --run-tests" - "gemhome" => "/home4/onezerh4/ruby/gems" - "gempath" => [] - "rdoc" => "--inline-source --line-numbers" you need to remove at least the gemhome and gempath entries from ~/.gemrc also note that you do not need to add --remote to gem ...


4

Why would you use Chef to monitor system statistics? There are any number of tools available (I prefer pnp4nagios for pretty graphs, and sysstat for detailed data collection) that are specifically designed for this sort of thing, why would you try and shoehorn monitoring into a configuration automation tool?



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