I am one of those people who considers herself completely replaceable. So, at work, I tend to try to continually make myself useful, so that even if I’m not needed to do what I was originally hired for, I can do something else that is required. I don’t think that I’m an expert at anything, but I like to learn enough so that I can solve problems that come up. Basically, I consider myself a generalist.
I recently purchased two Dell Optiplex 380s. Dual core pentiums with 3gb of ram and windows 7 professional for $434 each. I was quite busy and needed to get them quickly for my Mom’s office. Normally, I prefer to build my own systems because I know exactly what I’m getting. But the Dells were the right price and easy to order. After I ordered the Dells, I also ordered four Western Digital enterprise drives (WD5003ABYX) to use for a mirrored raid in each system. I did check that the optiplex systems had space for two more internal drives. I also knew that I’d be buying a separate raid card to put in the systems. I didn’t order that ahead of time because I wasn’t exactly sure what slots would be present/available in the system.
I am sure that there’s a better way to do this, but I got this working and I wanted to document it.
I had noticed that my webpages from my server at Slicehost were very, very slow. A quick look showed that I was out of memory and using a lot of swap space. A few times, I even caused my system to crash because I ran out of memory. Today, I cloned my server to a new one with more memory. This is my first post using the new server. I’m testing things to make sure everything is working. So far, so good.
If I have a number of different versions of rails, I can create projects for a particular version with:
This motherboard does NOT fit in this case. After rereading the specs, the motherboard is in the Flex ATX size and the case is mini ITX. While I thought I read that these were compatible, I can now state emphatically that they are not. So, my decision now is whether to return the case or modify it. If I knew I could find another case that fit the motherboard, I’d do that. But I’m not clear that I’ll be able to find a flex ATX case. In which case, I’m going to have to modify something anyway, so why not this cheapo case that I have.
Recently I had learned how to write a csv file in my rails app using the fasterCSV gem. In Rails3, CSV is now part of the standard library, so things are a little different. I also did a few trickier things this time around, so I’m updating my notes.
I have a table in my app, called entries. Entries belongs_to :users and has a field (decimal) called hours. There is another decimal field called cost. Cost is not entered by the user, but is calculated by multiplying the value in hours with the value in users named rate. To get this to work properly, I had to do the following.
I have a rails app that needs to provide a spreadsheet of all the data in one of the tables. Specifically, we have a simple signup form for an event. I need to be able to let a subset of users download a spreadsheet of the current people signed up with the information given on the signup form. Here’s what I did.
I have an openldap server running and wanted to use it for authentication on a rails 3 application.
I have to say that I’m not at all happy with Mac OS X as a web server. My immediate complaint is that it’s not serving up WordPress themes correctly. I know I have them working properly, but when I go to other computers, I see that they’re not correct. I guess it’s time for me to move back to linux where I know things work properly.
I’ve had some problems with the new bundle install in rails 3. Specifically, on my laptop, in the development environment, I use sqlite. But in production, I use mysql. I was getting all sorts of errors on my laptop about the mysql gem not working and on the production server the errors were about a problem with the sqlite gem. Ideally, I wanted the development server to ignore mysql and the production server to ignore sqlite. Here’s how it was done.
Originally posted on July 27, 2008
Originally posted August 3, 2008
Originally posted August 20, 2008
Originally posted January 7, 2010
Originally posted August 21, 2008
Originally posted June 28, 2009
Originally posted June 6, 2009
Originally posted January 1, 2010
Originally posted October 14, 2009
Originally posted October 15, 2009
I’ve been trying to do some stuff with ruby on rails and getting my program up and running here on coldandheartless. I had all kinds of trouble when I finally got to the deployment stage. The first errors I got were:
yo:site maryh$ cap deploy:setup /Library/Ruby/Site/1.8/rubygems.rb:280:in `activate’: can’t activate net-sftp (= 1.1.0, runtime) for , already activated net-sftp-2.0.2 for ["capistrano-2.0.0"] (Gem::LoadError) from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:35:in `require’ from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/ gems/capistrano-2.0.0/lib/capistrano/upload.rb:2 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require’ from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require’ from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/ capistrano-2.0.0/lib/capistrano/configuration/actions/file_transfer.rb:1 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require’ from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require’ from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/ capistrano-2.0.0/lib/capistrano/configuration.rb:12 … 7 levels… from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require’ from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/ capistrano-2.0.0/bin/cap:3 from /usr/bin/cap:19:in `load’ from /usr/bin/cap:19
After screwing around for a very long time, I found that I seem to have some old versions of gems that were messing me up. And I when I tried to uninstall them, I got this error:
yo:gems root# gem uninstall capistrano -i /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 Remove executables: cap, capify in addition to the gem? [Yn] Y ERROR: While executing gem … (Gem::FilePermissionError) You don’t have write permissions into the /System/Library/Frameworks/Ruby.framework/ Versions/1.8/usr/lib/ruby/gems/1.8/bin directory.
So I went to go and look at the above directory and it’s true that I don’t have write permissions because there was no bin directory there at all. After I created the bin directory, I was able to uninstall the gems. So now I should be able to uninstall the old stuff and put the newest files on.
Originally posted October 16, 2009
Originally posted Nov. 28, 2009.