Here’s a template for the top bar:

   // top bar
   new Ext.Panel({
	fullscreen: true,
	layout: {
		type: 'vbox',
		align: 'left'
	},
	items: [],
	dockedItems: [{
			dock: "top",
			xtype: 'toolbar',
			title: "HEADLINE"
			},]
});

And bottom bar:

// bottom bar
new Ext.TabPanel({
        tabBarDock: 'bottom',
	fullscreen: true,
	layout: {
		pack: 'center'
	},
	items: [{
		title: 'menu_1',
		html: '1',
		cls: 'card1',
		iconMask: true,
		iconCls: 'shop1',
		badgeText: '8'
		},
                [[[more items]]]
                ]
});

If you find that tabPosition: ‘bottom’ is not returning the results you expected, a quick glance in sencha-touch-debug.js will show you this that this has been replaced with tabBarDock: ‘bottom’

With access to a terminal, give www-data ownership of the wordpress directory:

sudo chown -R www-data:www-data /path/to/wordpress

If you get these errors when running: git push origin master

*** Project description file hasn't been set
error: hooks/update exited with error code 1
error: hook declined to update refs/heads/master

You might want to go into your repository machine and make sure hooks/update does not have x permissions. Sudo chmod -x update.

If you are trying to git push origin master and receive this error: fatal: Unable to create temporary file: Permission denied

You might need to sudo chown -R git /repository on the repository machine.

sudo apt-get install asterisk

Country code (for USA):

1

And run:

/usr/sbin/asterisk

Then Adhearsion:

sudo gem install adhearsion

And create an application:

sudo ahn create adhearsion_app

Change your width and height settings in your uploaders file:

class ImageUploader < CarrierWave::Uploader::Base
  version :thumb do
     process :resize_to_limit => [320, 320]
   end
end

And then you can run this from rails console production:

Asset.all.each do |a|
  a.image.recreate_versions!
end

JQuery Mobile is an awesome little tool that makes UI designs for mobile phones quick and easy. To make the transitions smooth, all links are AJAX requests which is great for the user but not so great for a Rails backend that may have some redirects. For example, I was having trouble with something like this:
1. User navigates to Baskets#new and fills out a form.
2. Baskets#new redirects to Fruit#new so that the user can select which fruit she likes.
On the second step, the Rails server console correctly displays that the redirect happened successfully but JQuery Mobile hangs. To solve this, I added rel=”external” to my link to the Baskets#new to, unfortunately, leave JQuery Mobile for this process. I was hoping to attach rel=”external” to the redirect but could not successfully bypass JQuery Mobile hanging on the user end.

Go grab a beer. It’ll be a while. But, Bundler’s worth it compared to the alternatives.

If you are running tests and receive this error:

DEPRECATION WARNING: save(false) is deprecated, please give save(:validate => false) instead. (called from _callback_before_

It might be due to Authlogic. Grep won’t give you an easy solution to this one. To fix, you might want to go here:

vendor/bundle/ruby/1.8/gems/authlogic-2.1.6/lib/authlogic/session/callbacks.rb

And change this:

def save_record(alternate_record = nil)
   r = alternate_record || record
   r.save_without_session_maintenance(false) if r && r.changed? && !r.readonly?
end

to this:

def save_record(alternate_record = nil)
   r = alternate_record || record
   r.save_without_session_maintenance(:validate => false) if r && r.changed? && !r.readonly?
end