Here's a small Rails helper to add the Ext JS library files based on your Rails environment:
... # your other helpers here
if RAILS_ENV == "production"
In your view layout header you just need to call:
Important: Don't forget the ext js css files!
You can find some more hints on debugging Ext JS here.