Fork me on GitHub Fork me on GitHub

Blog do Kiva

As aventuras de um tal Kivanio na TI

Rails for Kids 2009

cd /usr/ports/databases/mysql50-server/

make install clean

/usr/local/bin/mysql_install_db

chown -R mysql /var/db/mysql/

chgrp -R mysql /var/db/mysql/

/usr/local/bin/mysqld_safe –user=mysql &

/usr/local/bin/mysqladmin -u root password newpassword

Edite /etc/rc.conf

mysql_enable="YES"

Continuar lendo...
0 comentários. Comente este artigo.

FREEBSD PF SQUID

04/03/2008

int_if="gem0"
ext_if="kue0"
 rdr on $int_if inet proto tcp from any to any port www -> 127.0.0.1 port 3128
 pass in on $int_if inet proto tcp from any to 127.0.0.1 port 3128 keep state
pass out on $ext_if inet proto tcp from any to any port www keep state
Continuar lendo...
0 comentários. Comente este artigo.

MONGREL CLUSTER SETUP

With mongrel working and our webapp directory prepared we can proceed with the mongrel_cluster configuration step:
  $ sudo mongrel_rails cluster::configure -e production -p 8000 -N 3 -c /var/www/apps/testapp -a 127.0.0.1 --user mongrel --group mongrel
This will write a configuration file in config/mongrel_cluster.yml. We have setup to run our cluster in production mode as the user mongrel and will start 3 mongrel servers listening on ports 8000, 8001, and 8002. Now, lets do a quick test of what we have setup so far:
   $ sudo mongrel_rails cluster::start 
Checking our host on ports 8000, 8001, and 8002 we should now be able to see our test application.We can stop all of those mongrels with:sudo mongrel_railcluster::stop. fonte: http://mongrel.rubyforge.org/docs/mongrel_cluster.html
Continuar lendo...
0 comentários. Comente este artigo.

Para consultar rapidamente ports/packages duplicados (versões diferentes da mesma aplicação instalada), use o comando: pkg_info | sort | sed -e 's/-[0-9].*$//' | uniq -c | grep -v '^[[:space:]]*1' fonte: http://www.fug.com.br
Continuar lendo...
0 comentários. Comente este artigo.

Fonte: http://wiki.rubyonrails.org/rails/pages/HowtoUseRailsWithSubversion
  1. Importando sua aplicação rails.
    • navigate to the root of your rails app.
    • svn import . repository_url -m "Import" --username user
  2. Change to the directory containing your rails application, and rename it for safe keeping.
    • mv your_rails_app your_rails_app-backup
  3. Check out your rails application
    • svn checkout svn_url_to_your_repository your_rails_app
    • navigate to the root of this freshly checked out working copy.
  4. Remove the log files.
    • svn remove log/*
    • svn commit -m "removing all log files from subversion"
  5. Ignore the log files when they are re-created (Note for Capistrano/Switchtower users: the log directory is “shared” so it needs to be ignored itself, not just its contents)
    • svn propset svn:ignore "*.log" log/
    • svn update log/
    • svn commit -m "Ignoring all files in /log/ ending in .log"
  6. Ignore the tmp directory with all its content (cache, sessions, sockets) (Rails >= 1.1, ignore all tmp/ content.)
    • Rails < 1.1
      • svn propset svn:ignore "*" tmp/sessions tmp/cache tmp/sockets
    • Rails >= 1.1
      • svn remove tmp/*
      • svn propset svn:ignore "*" tmp/
      • svn update tmp/
    • svn commit -m "Ignoring all files in /tmp/"
  1. Don’t version control database.yml
    • svn move config/database.yml config/database.example
    • svn commit -m "Moving database.yml to database.example to provide a template for anyone who checks out the code"
  2. Ignore database.yml when it’s re-created
    • svn propset svn:ignore "database.yml" config/
    • svn update config/
    • svn commit -m "Ignoring database.yml"
Continuar lendo...
0 comentários. Comente este artigo.