Snymok

After pushing updated version of my  wordpress blog to OpenShift git repository, I have got "CARTRIDGE_VERSION_2: line 1: 2: command not found" error. You could see this error if you are pushing your changes in Drupal, Wordpress, Rails, Spring, Django, Reveal.js, CakePHP, or Dancer applications.

To fix this error go to OpenShift applications repository and get the latest version of your app (wordpress-example):

git clone https://github.com/openshift/wordpress-example.git

Then copy and replace .openshift folder in your git repository with early downloaded.

Now you can commit this changes to repository.

git add . -A
git commit -a -m "deploy fixed"
git push

Also you could find this article very useful