I was just reading a post on a cool company someone worked, housed in a building looking for repairs and then he decided to move on to one with better offices.

I remember working for a company in Oakland (DT), my last company before I started on my own.

Before that I was coming from another company (whose name has the word "innovative") which was the most un-innovative company I had ever worked. Technology was really old (file based home brewed database for example) and tons of crappy code. And the manager/vp used to find out the work done by doing wc -l on the code. The work environment was bordering on hostile. I was the first non-white employee I have been told :)
So anyway after the bad experience (I left it after 6 months and when asked I mentioned to my interviewers that I had made a horrible mistake) , I joined this new company (DT) which I knew from the beginning had a small window of opportunity to succeed. Yet I joined (in preference to others with better business model) because I just felt it would be fun and educative (bioinformatics). And fun it was! I learnt as I had never before, finally started working with full flair, making long strides professionally and enjoying it to the brim, even though it meant really long hours. I stuck with the company till the end. I had to take leave and come to India due to personal reasons, yet I retained my job when almost everyone else were being retrenched. After this I knew it would be hard to have this experience again in a job, so I started on my own! And I am glad I did.

Personally I felt that to enjoy your profession you need to follow your gut. You may not be the richest man out there but you will surely enjoy. And I can bet in the end you won't be poor either. The company as we feel in our micro-cosm is made up by your colleagues and manager. If you don't feel comfortable visualizing spending your time with them (in professional capacity) then, even if you are offered a rosy salary and perks, you should look for another job. You will just save yourself lots of headaches and trouble later on.