GZRuby Graduates to a new Venue - July 17, 7:30PM

After 2 years at the kudelabs office, gzruby has outgrown our humble common room. We have decided to move to a new venue - one with more space, and we think it will be a lot more fun! As always, gzruby is about getting a bunch of people together to talk about what we all do for a living. Its a chance to learn from each other, and find ways to improve our craft. If you are a ruby developer who has never attended, its like finding a new group of friends that you never knew you had.

View the invitation at the gzruby home page

The new venue is close to our office, close to Zhu Jiang New Town, and features hand-crafted beers made by one of Kudelab's former interns!

Posted by adevadeh 10 Jul 2013 at 02:14PM


Upcoming events in GZ: GZRUBY and StartupGrind GZ

GZRUBY10 - Wednesday Jan 16 - 7:30PM

GZRUBY10 will be held at the Kudelabs offices this wednesday evening, starting at 7:30. GZRUBY is a gathering of ruby developers, Kudelabs is one of the sponsors along with other ruby development companies in the city. Its always a lot of fun and a great chance to meet up and talk web development. Find out more at the Guangzhou Ruby Group page.

StartupGrind Guangzhou with Clement Song - Friday Jan 25 - 6:30PM

StartupGrind is a global network of startup communities that was established to educate, inspire, and connect entrepreneurs in the city. Here in Guangzhou, we see it as a way to connect the English speaking world with the Chinese startup ecosystem. The second event features founder Clement Song, who founded eCitySky and successfully completed an acquisition to YY Inc. He's now with YY as the Directory of Platforms and Services, and was able to experience an IPO first hand. Find out more at StartupGrind Guangzhou Meetup page.

GZ Plumeria

Posted by adevadeh 14 Jan 2013 at 05:24AM


Join us for GZRUBY9: Wed Nov 21, 7:30PM

The 9th gzruby meetup will be coming to the kudelabs offices in Guangzhou next Wednesday, November 21st at 7PM. We'd love to see you there! You'll meet several members from the growing Ruby community in our city, and have a chance to present an idea you're working on or a gem you use. Feel free to invite anyone who may be interested in ruby, or learning more about Ruby on Rails.

Some small snacks and drinks provided. Many thanks to continued support from Strand Beer and this month's sponsor: Beansmile

See more about this event at gzruby.org: gzruby9 - Nov 21, 7:30PM

gzruby is the Guangzhou Ruby User's group, we meet once every 2 months to share tips and techniques, as well as show off recent projects.

Posted by adevadeh 15 Nov 2012 at 02:58AM


Introducing gems.gzruby.org

gems.gzruby.org

As those of us living and working in China know,sometimes the internet can be troublesome . At some point last month, installing gems from the command line - something we do almost every day if not many times a day - no longer worked seamlessly. For whatever unknown reason, the rubygems production server is currently inaccessible or extremely unstable from within mainland China.

In discussions with the gzruby group, we tried to find workable solutions to this problem. One idea is to set up a reverse proxy. This solves the issue, but installing gems is still really slow. Another proposal is to set up a mirror, as described in this post by sachin. But rather than set up a local server, why not set up the proxy somewhere the greater community can use it.

Thus, gems.gzruby.org was born.

Setup

Add the following line to your Gemfile:

source "http://gems.gzruby.org/"

And change your ~/.gemrc to something like this:

---
:sources:
- http://gems.gzruby.org/
gem: --no-rdoc --no-ri

Code

The project was started by fnando. Our fork contains cosmetic changes only. If you want to set up your own proxy/cache, we recommend that you start from this fork by akitaonrails.

The app itself is a simple rack app that either serves a cached version of the gem, or fetches the gem from production.cf.rubygems.org. So the server on which you install must have access to this address.

If you already have a rails server running passenger on any VPS outside of china, setup is very easy. Simply clone the project into a new directory, and add a config to apache or nginx just as you would for any rails app.

Posted by adevadeh 28 Nov 2011 at 05:22AM


Rails on Campus: 华农版 - Session #2

Group photo from RoC Session #2

Last week we had another great Rails on Campus session with the students at South China Agriculture University 华南农业大学. Again, it is really great to see how motivated the students are. We are really impressed with their level of knowledge in web-development and how quickly they can pick up the topics we cover.

上周我们与华南农业大学的同学们度过了一个愉快的周末 -- Rails on Campus 的第二次活动。 非常高兴能够再一次感受到同学们的积极。大家对网页开发的扎实知识以及对新知识的快速吸收能力,给我们留下了深刻的印象。

This week the lesson covered the following topics:

以下是我们分享的一些主题:

  • Review Rails app structure, rails commands to create the DB and start the app
  • Basic resources and RESTful routes: index, show, create
  • Adding an ActiveRecord association: belongsto, hasmany
  • ActionView#form_for and building a nested form

We did this by adding a replies feature to our simple miniblog app. To follow along, you can grab the code at github RoC Lab #2.

Thanks to everyone who helped out, especially our speakers Rain Chen and Mysen Huang. We look forward to the next session where we will cover users and sessions.

非常感谢过来帮忙的各位,尤其是我们的 Rain ChenMysen Huang 两位主讲者。希望我们的下一次活动会为同学们带来更多的主题分享。


Rails on Campus is a program started by Leon Du and Shaokun Wu, 2 ruby developers in Guangzhou, China. The idea is to build a good set of material for introduction courses that can be used to teach Rails on college campuses. College students are often not exposed to newer technology, and are left to learn on the job. The goal of this program is to introduce students to the world of open source development frameworks to help prepare them for a good job.

Rails on Campus是由中国广州两位Ruby 开发者, Leon Du和Shaokun Wu 发起的。活动的初衷是为大学Rails的教学积淀一些有价值的学习材料。大学学生接触新技术的机会不十分多,而常常要上到工作岗位才开始学习。希望通过这次活动,可以为同学们带来更多开源的开发框架,以此为将来的好工作更好地准备自己。

Rails on Campus is sponsored by:

Rails on Campus的赞助团队有:

Posted by adevadeh 28 Nov 2011 at 03:11AM


Join us for the second gzruby meet up!

The second meeting of the gzruby group will be held in the Kudelabs Offices Wed, Sept 21 at 7:30PM.

Anyone in GZ who uses ruby, or is interested in ruby is invited!

For more information, join the mailing list: http://groups.google.com/group/gzruby

大家好!

本周三我们将会在老地方(Kudelabs)迎来又一个Rubyist party,大家准备好了吗? 为了照顾大家出行,避开下班高峰期,我们决定这次聚会稍晚(晚7:30)开始, 以便大家就餐,来到后可以直接进入主题进行讨论。 聚会预计持续1.5小时,出去开场介绍和自由讨论之外,应该有一个小时左右留给大家做发言, 目前我们已经有来自Sooyoung团队的Padrino主题,此外我们团队也将带来一个主题, 分享我们项目开发过程中使用的一些gem/工具,现在还留有时间可以准备1-2个主题, 大家有想来做分享的请踊跃回帖阿!

Hi all dear rubyist in GZ, it's party time again!

We'll have the next rubyist party on Wednesday(21th Sept) this week at 7:30 pm, same place at Kudelabs. To make it more convenient to all of us, we decide to get start a little later, so everyone can have dinner before come to the party, then we can get straight into the topics faster. We planned to have the event last in around 1.5 hrs, endding at around 9:00 pm, before everyone is sleepy ;-) besides the introduction/public discuss section, we should have about 1 hours for topics. We've already had Padrino from Sooyoung's team, our team will share a topic, something like "share our toolbox", so we still have time for 1-2 topics, if you have something to share, please post it here :)

Posted by adevadeh 19 Sep 2011 at 08:08AM


Rails on Campus Wrap-up

After 2 great sessions of Rails on Campus: 华工版, we'd like to thank everyone who took part in helping to plan and organize this event. We learned a lot from the experience, and we hope the attendees did as well. We plan to take our materials from this first run, refactor, and put on a better program next year!

Before we close out for the year though, I wanted to go over what you can do to continue learning on your own.

Install Rails

http://railsinstaller.org - Download and run the installer. It will install everything you need to get started writing your own Rails apps (ruby, git, rubygems, rails).

Get the demo code

http://github.com/kudelabs/roc-demo2 - Clone the project and get it running on your computer . git clone git://github.com/kudelabs/roc-demo2.git cd roc-demo2 rake db:migrate rails s open http://localhost:3000

Write some code

http://notepad-plus-plus.org/ - You can use any text editor to write code, but its much easier in a real code editor like Notepad++. It's free, give it a try.
http://http://guides.rubyonrails.org/getting_started.html - Take a look at the Rails Guides for more in-depth tutorials
http://asciicasts.com - Another great resource with tons of tips and information

Share with the world

http://heroku.com - A free service to host your amazing Rails app! It works right from the command line and in 5 minutes you have a public site that you can show to anyone.

Just Do It

So now you have no excuse. You have the tools, you have the code, you have the servers. Go write an inspiring app and make us proud!

Posted by adevadeh 09 Jun 2011 at 09:24AM


GZTechJobs - Job Board for GZ Geeks

Remember the board which is stuck by a lots of want ad near the canteen of campus? Here what is GZTechJobs, we support a board, you can post your want ad on it, no sign up, no confirmation, just one click and post your want ad!
还记得校园饭堂门口白板上面的那些招聘小广告么? GZTechJobs就是为你提供的那块白板, 你可以在上面随意粘贴你的招聘信息, 不需要注册, 不需要我们确认, 只需要写上你的招聘信息, 然后粘贴上去!

GZTechJobs is focus on Guangzhou IT position information, let's go and see the screenshot of GZTechJobs and post your want here!
GZTechJobs 主要针对广州IT职位的招聘信息, 让我们来看看它是如何方便简单地发布你的招聘信息吧!

  • In homepage, you can see the sharp button "Post a Job", right, click it!
    在主页上, 你可以看到一个显眼的"发布职位"的按钮, 对, 就是它, 点一下吧! null
  • Then in posting page, fill with your want information, click "Submit"
    然后填上你的招聘要求, 好了, 提交吧! Click Here!
  • Now, you can see your post and geeks will find the job here and hope they will email you!
    现在, 你就可以在主页上面找到你刚刚发布的招聘信息了, 程序猿们可以在这里找到他们合适的职位, 希望他们给你发邮件吧! YourPost

If you have any question about GZTechJobs, just feel free to email us at jobboard@kudelabs.com
如果有任何关于GZTechJobs的疑问, 欢迎随时给我发邮件jobboard@kudelabs.com

Posted by 潘小园 11 May 2011 at 04:43AM


three steps to upgrade redmine from 0.9.x stable to 1.1 stable

Redmine makes it pretty easy and smooth for us to upgrade itself. Here is a link for general upgrade from Redmine: RedmineUpgrade.

In 1.1 stable version, there are some good new features that 0.9.3 doesn't have, i,e: the Gantt chart , the Calendar, and the new concept of Subtasks/Parent tasks and so on. For more detailed features of newest redmine, you may visit: Features.

If you have redmine running at an old version like 0.9.x, and feel strongly like upgrading redmine to the latest stable version, you may try this simplest solution:

Step 1: Backup files/ and database, very important!
Step 2: svn switch http://redmine.rubyforge.org/svn/branches/1.1-stable 
Step 3: rake db:migrate RAILS_ENV=production

Note that Steps 2 and 3 must be done in your existing redmine root.

After you have completed the above three steps, just restart your application and you will see the new exciting Redmine, hooray!

Just in case of you are not familiar with linux, let me explain more:
1. How to backup files?

cp -r your_redmine_root/files your_backup_destination/files 
2. How to backup database?
mysqldump -u username -p password redmine_db_name >  your_backup_destination/redmine_db_backup.sql

Posted by Mysen 09 Feb 2011 at 09:15AM


Automated testing tools:Selenium & Watir

When should use automation?

What is advantageous for automated testing? When should one decide to automate test cases?

For the short term project,manual testing may be more effective. If an application has a very tight deadline, there is currently no test automation available,then manual testing is the best solution.

However, automation has specific advantages for improving the long-term efficiency of a software team’s testing processes.As we can save the time special for the regression test.What is more,it is trivial for the tester if repeat the same test case.

Selenium

  • Start from Selenium IDE:
  • Selenium IDE is a plug-in for FireFox,and isn't available for other browser.

    It provides an easy-to-use interface for developing and running individual test cases or entire test suites.

    Selenium-IDE has a recording feature,then can export the code in several kinds of language.

    Right now,give a example for how to use it.

    Suppose we want to login Gmail:

    Open the FireFox browser,click the "Tools" tab,then you can see the "Selenium IDE" is in the list,click it and will pop up a window as following:

    Selenium IDE 1.0.7

    Then back to the FireFox browser,open google home page and click the "Gmail" link,then fill info and press "Sign in" button.

    Turn to the Selenium IDE again,all the actions are recorded,see the following screenshot:

    Record_login_gmail

    Click the red round button in the upper right corner to stop the record.The browser will execute the action what you did just now when hit the green triangle button.

  • Selenium RC:
  • Selenium IDE can only run the test in FireFox.Obviously,this is not enough.So we must mention Selenium RC.

    We can export the code and apply the test in others browser through Selenium RC.

    It is simple to export the code in Selenium IDE,view the picture:

    export_code

    Usually,the exported code isn't perfect.Luckily,Selenium-RC allows the test automation developer to use a programming language for maximum flexibility and extensibility in developing test logic.

    It provides an API and library for each of its supported languages: HTML, Java, C#, Perl, PHP, Python, and Ruby. This ability to use Selenium-RC with a high-level programming language to develop test cases also allows the automated testing to be integrated with a project’s automated build environment.

  • Selenium Commands:
  • Contain three parts:Command,Target and Value

    Just give the simple explanation here

    Command:What you want to do for the browser.Such as,"click" a link,"fill" the textarea and so on.

    Target:Tell the browser which element you want to execute the command.

    Value:The value that you want to fill or expect.Sometimes it is blank.It depends what kind of command is used.

    Watir:

  • Introdution
  • Watir is an open-source library for automating web browsers.

    It is a family of Ruby libraries but it supports your app no matter what technology it is developed in.

    It drives browsers the same way people do. Watir also checks results, such as whether expected text appears on the page.

    Watir supports multiple browsers on different platforms.

    Windows 2000/2003/XP/Vista/7 : IE6,IE7,IE8 and FireFox

    Mac:FireFox and Safari

    Ubuntu:FireFox

  • Install Watir
  • Install watir on different system is not the same.I just describe how to install it on Mac for Safari.

    You have to install Ruby first,we recommend using Ruby 1.8.6 on all platforms.

    The type the following commands in Terminal:

    $ sudo gem update --system
    
    $ sudo gem install rb-appscript
    
    $ sudo gem install safariwatir
    

    A moment later,the following info appears and indicates the Safariwatir is installed successfully.

    $ sudo gem install safariwatir
    Successfully installed safariwatir-0.3.7
    1 gem installed
    Installing ri documentation for safariwatir-0.3.7...
    Installing RDoc documentation for safariwatir-0.3.7...
    
  • Use Safariwatir step by step:
  • We also choose the Login Gmail as example so that it is easy to compare what is different between Watir and Selenium.

    Open your Terminal and start irb.

    $ irb
    

    Before going to the Google,you have to let Ruby know you want to use SafariWatir,so please type:

    irb(main):001:0> require "rubygems"
    => true
    irb(main):002:0> require "safariwatir"
    => true
    

    Then start the browser

    irb(main):003:0> safari=Watir::Sfari.new
    => #, @app=app("/Applications/Safari.app"), @document=app("/Applications/Safari.app").documents[1]>>
    

    Go to Google:

    irb(main):004:0> safari.goto "http://www.google.com"
    => nil
    

    Click the "Gmail" link in the upper left corner:

    irb(main):005:0> safari.link(:text,"Gmail").click
    => nil
    

    After flowing to the login page,you can fill personal info and hit "Sign in" button to login.

    To do this, we have to find out some attribute of text field, like id or name, so Safariwatir can find it on the page. We will use Firebug for the first time.

    irb(main):006:0> safari.text_field(:id,"Email").set("ruby@gmail.com")
    => :missing_value
    irb(main):007:0> safari.text_field(:id,"Passwd").set("ruby")
    => :missing_value
    irb(main):008:0> safari.button(:value,"Sign in").click
    => nil
    

    If the username and password are correct,you should login successfully.

    Compare

  • Convenience
  • Selenium IED can record the acitons and export the code,so can save lots of time for the script developer.Watir doesn't have this tools,all the codes have to be typed by hand.

  • On different system
  • Mac OS X:

    Developers still need to strive for Safariwatir and Firewatir,as lots of commands that works fine in Windows cannot apply in Mac.What is more,performance isn’t stable.

    However,Selenium can resolve all the issue that watir is unable to deal with.

    So watir is not good as Selenium on Mac.

    Windows:

    Use selenium to test IE is not the same as FireFox in Mac.Especially for the locator,running the script will be very slow if the locator isn't suitable.

    Originally developed watir is to apply on IE.Until now,it is perfect.

    Posted by 钟宇平 10 Jun 2010 at 09:29AM