This is an update to my earlier post about Rails Screencasts .
British Rails developer Eifion Bedford is putting together a collection of Ryan Bates’ free Railscasts series in a text form. This means he is painstakingly transcribing Ryan’s words, putting together screenshots that you can learn from, and code examples that you can copy and paste. This is a great way to consume the material, especially if English is not your first language. The ASCII Casts, as he is calling them, are a great addition to the growing volume of free learning material for Ruby and Rails. I recommend the security series and the performance tips. Thanks to Eifon and his efforts to illuminate the wild world of web development!
Hi guys, I’m writing this to share with you the joy of using ROR with Mysql on Ubuntu 8.10 Desktop Edition.
First, we can get a latest free version of Ubuntu from here.
Please choose a desktop edition, because Server Edition is not containing a GUI for us which specializing in host side.
Well, after we have installed the newest Ubuntu, let’s try our ROR with Mysql development enviroment ASAP.
The official installing ROR site goes here, or you may need only type several commands as following:
1. Installing RUBY:
<pre> sudo apt-get install ruby-full </pre> #‘ruby-full’ package will make sure you have all the packages that add up to a full Ruby installation.
2. Installing RUBYGEMS:
tar xzvf rubygems-1.3.1.tgz
sudo ruby setup.rb
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
3. Installing RAILS and Mongrel:
<pre> sudo gem install rails mongrel </pre> # yeah, ROR has been done here!
4. Installing MYSQL:
<pre> sudo apt-get install mysql-server mysql-client </pre>
It seemingly worked and I could start my rails projects, but when I tried to rake task, the system was just crashed and came out a result:"
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql. rake aborted!"
Oops, let’s try to listen to it:
<pre>sudo gem install mysql </pre>
<pre>"Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb install mysql
- extconf.rb failed *
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options."
It made me feel quite irritating after I tried many times without efforts, but finally, the problem was solved by installing a package named libmysql-ruby1.8. This package is an API module that allows to access MySQL database from programs in Ruby programming language.
So let’s correct our step 4 to:
<pre> sudo apt-get install mysql-server mysql-client libmysql-ruby1.8</pre>
Cheers, we can really start our RAILS application now.
Last but not least, to make our default gnome-editor more useful as a programming IDE, we can try to install some plugins into gedit to make it like Textmate On Mac. e.g. there is an excellent project named gmate which included many plugins that we need indeed.
Please let me know when you still have any installing problems with ROR & MYSQL on Ubuntu.
We took a company trip to Chime Long Amusement park earlier in the week. Some of my co-workers decided to hop on this little ride 3 times in a row. I bowed out after the first, thank you very much.
Google recently announced that they would be hosting a collection of photos from Life Magazine. Dan at the excellent China Law Blog pointed out that you can search through the pictures to find interesting stuff. A search for “Guangzhou” strangely doesn’t return any entries; but of course, when many of these pictures were published, this city was known as “Canton”. There are only about 200 results for Canton, but some of them are great pictures of the City. This is the search phrase that should give you the right results:
Shamain Island is clearly recognizable, and many of the street scenes must have been taken in the Renmin Nan Lu area. Some of my favorites:
- Streeside Baozi
- Aerial view, you can see the cathedral on Yide Lu in the center of the shot
- Guangzhou’s answer to the Flatiron Building. Its still there on Yanjiang Lu. Flatiron Building
- Do you recognize Haizhu Square?
- This GZ is slowly disappearing, I love the art deco architecture
- This is how our neighboorhood still looks
- I bet we can find this street, somewhere near Yide Lu and Renmin Lu.
- Kids playing in the park on Shamian Island
The much anticipated Rails 2.2 release is finalized with a host of new features. One of the features we are most excited about are the new multi-threaded capabilities for Rails. This will improve application response time in general, and allow us to get more use out of each server. I think memoization can be useful as well, it will be interesting to see how much it helps. As usual, Peter Cooper at Ruby Inside has put together an all-encompassing post with all the info you might need. And as a side note, this release also includes a little patch submitted by our team.
Thanks and congratulations to the core team for another solid release.
In Firefox, it’s very easy to set the attribute of size to 1 for a text field. But in IE, even the size is 1, it still takes a lot of space in the page. One simple solution but not perfect is to set the style of width, e.g. style=“width: 10px”. You will need to tweak it a little bit in order to find a good width for your web pages. :(
Below are the code:
<input type="text" size="1" maxlength="1" value="1"></input> <!-- This works well in Firefox, but not IE -->
<input type="text" size="1" maxlength="1" value="1" style="width: 10px"></input> <!-- This works well in Firefox and IE -->
Hierarchical select refers to situations where the select options represent a hierarchical structure of objects. In such cases, we assume that the option list of each select element contains a certain level in the object hierarchy. When an option is chosen, a new select element will appear next to the current one, containing options of children of the selected item, unless it reaches a leaf. We represent such a kind of select as a class, which can be instantiated where a hierarchical select is needed.
We are currently interviewing candidates for a position on our team. If you are intersted, be sure to send us your resume and cover letter. I previously posted some tips about how to submit a resume, please do read that as well.
Software Engineer – Web Applications, Ruby on Rails
We are looking for outstanding software engineers with experience and interest in Web applications.
You will be part of a team responsible for developing and deploying software for our clients. Your responsibilities will include working with overseas partners on product specifications, collaborating with your team on software design ideas, and of course writing excellent code.
- Outstanding analytical thinking and software design skills
- Bachelor’s Degree in Computer Science, or other Engineering degree and significant programming experience, Master’s Degree is more welcome
- Excellent English communication skills
- Experience with Ruby on Rails, or possibly other Web App framework and ability to learn quickly
- Experience using Linux or some other flavor of Unix
- Experience with open source tools
- Able to fight seven adult tigers while feeding a baby panda with your toes.
- Open-minded and willing to share ideas with others
- Self-motivated, good at finding help online
- Deep understanding of HTML and CSS
To apply send your ENGLISH cover letter and resume to firstname.lastname@example.org