Installing capistrano in Centos
Very very easy in CentOS, just like it would be in a Debian system:
# yum install ruby -y
# yum install rubygems -y
Really, it couldn't be easier. Next step, just having fun with Capistrano :-)
- Read more about Installing capistrano in Centos
- Log in or register to post comments
Upgrading two git repositories automatically
There is a simple way of upgrading or executing a command immediatly after a push has been done.
We just need to go to the server repository (the one which is going to receive the push), and enter in hooks (.git/hooks or hooks if it's a bare repository).
Then, we rename the post-receive.sample to post-receive, without extension, and add this content:
echo "********************"
echo "Post receive hook: Updating User Staging"
echo "********************"
cd ../live
GIT_DIR='.git'
git pull origin master
- Read more about Upgrading two git repositories automatically
- Log in or register to post comments
Capistrano config.rb
set :application, "bounty app"
#set :repository, "localhost:/var/www/git/bountyrepo"
set :repository, "localhost:/var/www/git/blessed"
set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
- Read more about Capistrano config.rb
- Log in or register to post comments
Developing under Linux Apache in windows
Contradictory? Yes, a bit, but you cannot allways choose the systems and architecture in which you are working.
solution? Runing apache under linux instead of runing wamp or some weird solutions like that (i don't like at all, sorry).
First, install vbox: https://www.virtualbox.org/
Second, download the iso of your preffered linux distro, and install it.
Third, when you machine is running, go to Devices>install guest additions.
- Read more about Developing under Linux Apache in windows
- Log in or register to post comments
Accessing centos apache/httpd from vbox host
This is the scenario. You installed vbox in your Mac, windows or Linux computer. Then you´ve installed Centos or Red Hat (or any other Red Hat flavor) in this virtual box.
Next step, installed httpd (apache2) and... even it is running and httpd status confirms it with a "running" message, it cannot be accesible from your host machine.
The problem is on iptables. Red Hat by default denies access to this machine from other (external) machines. Solution? Very easy, open iptables file:
vim /etc/sysconfig/iptables
- Read more about Accessing centos apache/httpd from vbox host
- Log in or register to post comments
git Integration Manager Workflow tutorial
IN BLESSED
mkdir gitlab/blessedrepo
cd gitlab/blessedrepo
git init
Creating new files:
vim README
adding:
git add .
git commit -m "first file in blessed repository"
git push
IN DEVELOPERS
mkdir developer2
cd developer2
git clone /Users/air/gitlab/blessedrepo
ls
blessedrepo
ls blessedrepo/
README
cd blessedrepo
vim fileindev2.html
git add .
- Read more about git Integration Manager Workflow tutorial
- Log in or register to post comments
private git repositories in bitbucket
Let me got directly to the point. The bitbucket documentation is wrong, on the begining you are just suposed to do a git remote add origin
in the directory which you want to commit. But this will not work:
fatal: Not a git repository (or any of the parent directories): .git
Solution? Init the repository:
git init
git remote add origin https://ACCOUNT@bitbucket.org/ACCOUNT/REPOSITORY.git
- Read more about private git repositories in bitbucket
- Log in or register to post comments
Theming you module
Docs are not allways the best part in programming languages, frameworks or CMS. Sometimes you try to make something and you find problems, just because poor documentation.
It's my situation just now. I was trying to create tpl.php files for a module, and it is really easy... if you follow exactly all the steps.
First, hook_menu:
/**
* Implements hook_menu().
*/
function mymodule_menu() {
$items = array();
/*
- Read more about Theming you module
- Log in or register to post comments
Solving error 500 in Symfony2
Having the typical error 500 in Symfony2? Well, it is very tipical, not just in Symfony but in Drupal and other web frameworks and CMS. Solving it can be a big headache... if you don't know where to see.
In Drupal it is easy to solve it using show all errors in php (on index.php of Drupal, for example). In Symfony2 you can use this tip:
Go to the root of your app. Then execute a clean cache:
- Read more about Solving error 500 in Symfony2
- Log in or register to post comments