Home |  MySQL Buzz |  FAQ |  Feeds |  Submit your blog feed |  Feedback |  Archive |  Aggregate feed RSS 2.0 English Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 30 of 37 Next 7 Older Entries

Displaying posts with tag: rails (reset)

[Rails] Unicorn ignores SIGUSR2 completely?
+0 Vote Up -0Vote Down
[Rails] Unicorn ignores SIGUSR2 completely?:

It doesn’t. See the link.

How to restart god after deploying a Rails app with Capistrano
+0 Vote Up -0Vote Down

If you use the God gem to manage your Ruby on Rails application server (Unicorn, for example), you will have to restart the application server using God after deploying a new version.

I found a solution that polls the application’s tmp directory for restart.txt (like Phusion Passenger does) from within the god configuration and restarts the app if the file is touched. However, it didn’t work well for me because the ps syntax varies on different systems and the method is not very reliable (it triggered when I didn’t want it to, and vice versa).

So I thought about it and now I think that the best solution to restart an app via god is to do (surprise):

god restart YOUR-APP

And it should be done exactly if capistrano deploys,

  [Read more...]
[FreeBSD] unicorn.god
+0 Vote Up -0Vote Down

I had a very strange problem concerning my Ruby on Rails installation, using FreeBSD, nginx, Unicorn and God.

When starting god from the command line as root, everything worked. However, as soon as I placed the god command into /etc/rc.local or a even service file in /usr/local/etc/rc.d, god didn’t start the Unicorn server but showed exit code 127 for “bundle exec unicorn -E production -c config/unicorn.rb”.

So I added a log directive to the god configuration and looked at the log file. It said:

env: ruby1.9: No such file or directory

Then I changed the god configuration to include /usr/local/bin in the PATH and now everything works. Here my configuration file:

RAILS_ROOT = '/srv/www/my-project-prod/current'

God.watch do |w|
    w.name = 'my-project'
    w.interval = 30.seconds

    w.uid = 'my-project'
    w.gid =
  [Read more...]
DbCharmer 1.7.0 Release: Rails 3.0 Support and Forced Slave Reads
+0 Vote Up -0Vote Down

This week, after 3 months in the works, we’ve finally released version 1.7.0 of DbCharmer ruby gem – Rails plugin that significantly extends ActiveRecord’s ability to work with multiple databases and/or database servers by adding features like multiple databases support, master/slave topologies support, sharding, etc.

New features in this release:

  • Rails 3.0 support. We’ve worked really hard to bring all the features we supported in Rails 2.X to the new version of Rails and now I’m proud that we’ve implemented them all and the implementation looks much cleaner and more universal (all kinds of relations in rails 3 work in exactly the same way and we do not need to implement connection switching for all kinds of weird corner-cases in ActiveRecord).
  • Forced
  [Read more...]
On Password Strength
+6 Vote Up -0Vote Down
XKCD (as usual) makes a very good point – this time about password strength, and I reckon it’s something app developers need to consider urgently. Geeks can debate the exact amount of entropy, but that’s not really the issue: insisting on mixed upper/lower and/or non-alpha and/or numerical components to a user password does not really improve security, and definitely makes life more difficult for users. So basically, the functions that do a “is this a strong password” should seriously reconsider their approach, particularly if they’re used to have the app decide whether to accept the password as “good enough” at all. Update: Jeff Preshing has written an   [Read more...]
Encoding and JRuby on Rails
+0 Vote Up -0Vote Down

Studing JRuby and Rails I faced some encoding problems. The solution was very easy. First you must have to create your database using utf8 character set. In case you are using MySQL, just do the following:

CREATE DATABASE `yourdatabasename` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

or

ALTER DATABASE yourdatabasename CHARACTER SET utf8 COLLATE utf8_general_ci;

If you already have a database with records, read this post from @akitaonrails.

In my case, I’m using the activerecord-jdbc-adapter gem, and connecting to the database through the MySQL JDBC Connector (http://www.mysql.com/downloads/connector/j/).

At this

  [Read more...]
TOTD #150: Collection of GlassFish, NetBeans, JPA, JSF, JAX-WS, EJB, Jersey, MySQL, Rails, Eclipse, and OSGi tips
Employee +0 Vote Up -1Vote Down

This is the 150th tip published on this blog so decided to make it a collection of all the previous ones. Here is a tag cloud (created from wordle.net/create) from title of all the tips:

As expected GlassFish is the most prominent topic. And then there are several entries on NetBeans, JRuby/Rails, several Java EE 6 technologies like JPA, JAX-WS, JAX-RS, EJB, and JSF, and more entries on Eclipse, OSGi and some other tecnhologies too. Here is a complete collection of all the tips published so far:

  [Read more...]
TOTD #150: Collection of GlassFish, NetBeans, JPA, JSF, JAX-WS, EJB, Jersey, MySQL, Rails, Eclipse, and OSGi tips
Employee +0 Vote Up -0Vote Down

This is the 150th tip published on this blog so decided to make it a collection of all the previous ones. Here is a tag cloud (created from wordle.net/create) from title of all the tips:

As expected GlassFish is the most prominent topic. And then there are several entries on NetBeans, JRuby/Rails, several Java EE 6 technologies like JPA, JAX-WS, JAX-RS, EJB, and JSF, and more entries on Eclipse, OSGi and some other tecnhologies too. Here is a complete collection of all the tips published so far:

  [Read more...]
TOTD #150: Collection of GlassFish, NetBeans, JPA, JSF, JAX-WS, EJB, Jersey, MySQL, Rails, Eclipse, and OSGi tips
Employee +0 Vote Up -0Vote Down

This is the 150th tip published on this blog so decided to make it a collection of all the previous ones. Here is a tag cloud (created from wordle.net/create) from title of all the tips:

As expected GlassFish is the most prominent topic. And then there are several entries on NetBeans, JRuby/Rails, several Java EE 6 technologies like JPA, JAX-WS, JAX-RS, EJB, and JSF, and more entries on Eclipse, OSGi and some other tecnhologies too. Here is a complete collection of all the tips published so far:

  [Read more...]
DbCharmer – Rails Can Scale!
+0 Vote Up -1Vote Down

Back in November 2009 I was working on a project to port Scribd.com code base to Rails 2.2 and noticed that some old plugins we were using in 2.1 were abandoned by their authors. Some of them were just removed from the code base, but one needed a replacement – that was an old plugin called acts_as_readonlyable that helped us to distribute our queries among a cluster of MySQL slaves. There were some alternatives but we didn’t like them for one or another reasons so we’ve decided to go with creating our own ActiveRecord plugin, that would help us scale our databases out. That’s the story behind the first release of DbCharmer.

Today, six months after the first release of

  [Read more...]
Reusing models outside of Rails
Employee +0 Vote Up -0Vote Down

If you have done a good job of building your rails models, you may find that they are helpful for your non-rails system maintenance and such. They may even be necessary to reuse if you follow the rails model of using activerecord validations (rather that database RI) to preserve the integrity of your data.


Or you may just find yourself rewriting the same code again and again, and want all that good railsiness to make it easier to write and maintain. Personally I find myself in some instance of ./script/console as often as irb just so I can get the activesupport helper methods ( 4.days.from_now and such) that many rails developers are surprised to find are not actually a standard part of ruby.


So, the good news is it is easy to reuse rails code outside of rails.


Let's say you want to do some data manipulation (reporting, loading,




  [Read more...]
Reusing models outside of Rails
Employee +0 Vote Up -0Vote Down

If you have done a good job of building your rails models, you may find that they are helpful for your non-rails system maintenance and such. They may even be necessary to reuse if you follow the rails model of using activerecord validations (rather that database RI) to preserve the integrity of your data.


Or you may just find yourself rewriting the same code again and again, and want all that good railsiness to make it easier to write and maintain. Personally I find myself in some instance of ./script/console as often as irb just so I can get the activesupport helper methods ( 4.days.from_now and such) that many rails developers are surprised to find are not actually a standard part of ruby.


So, the good news is it is easy to reuse rails code outside of rails.


Let's say you want to do some data manipulation (reporting,




  [Read more...]
Reusing models outside of Rails
Employee +0 Vote Up -0Vote Down

If you have done a good job of building your rails models, you may find that they are helpful for your non-rails system maintenance and such. They may even be necessary to reuse if you follow the rails model of using activerecord validations (rather that database RI) to preserve the integrity of your data.


Or you may just find yourself rewriting the same code again and again, and want all that good railsiness to make it easier to write and maintain. Personally I find myself in some instance of ./script/console as often as irb just so I can get the activesupport helper methods ( 4.days.from_now and such) that many rails developers are surprised to find are not actually a standard part of ruby.


So, the good news is it is easy to reuse rails code outside of rails.


Let's say you want to do some data manipulation (reporting,




  [Read more...]
OSDC 2009 – call for papers reminder
+0 Vote Up -0Vote Down

The call for papers for OSDC 2009 is open until 30 June 2009; yes that’s only a few more days. Submit your abstract and do a talk at this fab conference!

This is a grassroots style conference designed by developers for developers.  It covers Perl, Python, Ruby/Rails, PHP, Java/Grails and Open Source operating systems as well as some business aspects.  If you’d like to cover something else as well that is Open Source themed, please feel free.

The Call for Papers can be found at: http://2009.osdc.com.au/call-for-papers
The important dates are:

  • Call for Papers Closes      30 June, 2009
  • Proposal acceptance         20 July, 2009
  • Accepted paper submissions  14 September, 2009
  • OSDC 2009 Main Conference!  25th to 27th November, 2009

OSDC


  [Read more...]
FreeImage and ImageScience on OpenSolaris
Employee +0 Vote Up -0Vote Down

Although rails is a great development environment for web applications, for a newbie the deployment of a rails application can be challenging due to the myriad dependencies on various gems, native libraries etc.

image_science is one such ruby library that provides an easy way to generate thumbnails. It is therefore quite popular in web2.0 type applications (there isn't a site today that doesn't let you upload photographs of yourself, your pets, gadgets, whatever).  It is a very simple implementation and available as a ruby gem and so easy to install. However, the real work is done by a native library called FreeImage and installing this on OpenSolaris is a little bit of work. Although, I use OpenSolaris here, the instructions apply to Solaris 10 as well if you are using ruby from

  [Read more...]
First Olio Release
Employee +0 Vote Up -0Vote Down

We have just released the first binary version of Apache Olio for both the PHP and Rails implementation. Both implementations have been tested quite thoroughly now and we think they are robust enough for serious use - especially for performance testing the workloads.


I introduced Olio in a previous post. It is a toolkit that includes a sample web2.0 application implemented in both PHP and Rails that includes a load generator to drive load against the application.


Please visit the Olio site and download the kits. If you find it interesting, I invite you to come join the project.

FreeImage and ImageScience on OpenSolaris
Employee +0 Vote Up -0Vote Down

Although rails is a great development environment for web applications, for a newbie the deployment of a rails application can be challenging due to the myriad dependencies on various gems, native libraries etc.

image_science is one such ruby library that provides an easy way to generate thumbnails. It is therefore quite popular in web2.0 type applications (there isn't a site today that doesn't let you upload photographs of yourself, your pets, gadgets, whatever).  It is a very simple implementation and available as a ruby gem and so easy to install. However, the real work is done by a native library called FreeImage and installing this on OpenSolaris is a little bit of work. Although, I use OpenSolaris here, the instructions apply to Solaris 10 as well if you are using ruby from

  [Read more...]
FreeImage and ImageScience on OpenSolaris
Employee +0 Vote Up -0Vote Down

Although rails is a great development environment for web applications, for a newbie the deployment of a rails application can be challenging due to the myriad dependencies on various gems, native libraries etc.

image_science is one such ruby library that provides an easy way to generate thumbnails. It is therefore quite popular in web2.0 type applications (there isn't a site today that doesn't let you upload photographs of yourself, your pets, gadgets, whatever).  It is a very simple implementation and available as a ruby gem and so easy to install. However, the real work is done by a native library called FreeImage and installing this on OpenSolaris is a little bit of work. Although, I use OpenSolaris here, the instructions apply to Solaris 10 as well if you are using ruby from

  [Read more...]
First Olio Release
Employee +0 Vote Up -0Vote Down

We have just released the first binary version of Apache Olio for both the PHP and Rails implementation. Both implementations have been tested quite thoroughly now and we think they are robust enough for serious use - especially for performance testing the workloads.


I introduced Olio in a previous post. It is a toolkit that includes a sample web2.0 application implemented in both PHP and Rails that includes a load generator to drive load against the application.


Please visit the Olio site and download the kits. If you find it interesting, I invite you to come join the project.

First Olio Release
Employee +0 Vote Up -0Vote Down

We have just released the first binary version of Apache Olio for both the PHP and Rails implementation. Both implementations have been tested quite thoroughly now and we think they are robust enough for serious use - especially for performance testing the workloads.


I introduced Olio in a previous post. It is a toolkit that includes a sample web2.0 application implemented in both PHP and Rails that includes a load generator to drive load against the application.


Please visit the Olio site and download the kits. If you find it interesting, I invite you to come join the project.

Posterous and FriendFeed talk infrastructure
+0 Vote Up -0Vote Down

A couple interesting things coming out of startup land.

For one, Posterous has a little writeup on Building and Scaling a Startup on Rails: 12 Things We Learned the Hard Way. Good things to take away include using Sphinx/Solr for search, but the real important takeaway for the MySQL crowd is Storage engine matters, and you should probably use InnoDB. If you’re writing an application, know your storage engines. There are also bits to tell you how to use query_viewer and New Relic to help you fix database bottlenecks, use memcached later, and more. Its a great read.

Next up, there’s How FriendFeed uses MySQL to store schema-less data. I hope Bret

  [Read more...]
Loops plugin for rails and merb released
+0 Vote Up -0Vote Down

loops is a small and lightweight framework for Ruby on Rails and Merb created to support simple background loops in your application which are usually used to do some background data processing on your servers (queue workers, batch tasks processors, etc).

Originally loops plugin was created to make our (Scribd.com) own loops code more organized. We used to have tens of different modules with methods that were called with script/runner and then used with nohup and other not so convenient backgrounding techniques. When you have such a number of loops/workers to run in background it becomes a nightmare to manage them on a regular basis (restarts, code upgrades, status/health checking, etc).

After a short time of writing our

  [Read more...]
Rails Developer for a Large Startup: My Vision of an Ideal Candidate
+0 Vote Up -0Vote Down

Few days ago we were chatting in our corporate Campfire room and one of the guys asked me what do I think about Rails developers hiring process, what questions I’d ask a candidate, etc… This question started really long and interesting discussion and I’d like to share my thoughts on this question in this post.

So, first of all I would like to explain what kind of interviews I really hate Ever since I was thinking of myself as of a developer (many years ago) and was going to “software developer position” interviews I really hated questions like “What is the name and possible values of the third parameter of the function some_freakin_weird_func() from some_weird.h” or “How to declare a virtual destructor and when it

  [Read more...]
Nice Webinar: MySQL, NetBeans, JRuby-on-Rails
Employee +0 Vote Up -0Vote Down

Hi all,

Arun Gupta has blogged about a webinar he did on MySQL, NetBeans, and JRuby-on-Rails. Be sure to check this out.

The webinar has been recorded, so you can check it out when you have time. Here is the link:

MySQL/NetBeans/JRuby-on-Rails Webinar.

Enjoy.

Cheers!

--James

Why Ruby (and Rails) is Awesome
+0 Vote Up -0Vote Down

I was invited to give a short introduction to Ruby on Rails at Tech Meetup in Edinburgh a couple of days ago. I’d been racking my brain for days on what to talk about — 15 minutes is too short for me to give a meaningful introduction to Rails — and eventually settled on telling a few stories.

The slides don’t make much sense on their own, so I’ve included the “script” of what I talked about too. I deviated quite a bit from the script as I got into it, so hopefully I should be able to provide audio (or, dread the thought, maybe even video) of the talk in due course.

Intro

I’m Graeme. I’m the Managing Director of Rubaidh Ltd, and have been developing Ruby on Rails applications professionally for 3 years now.

Telling Stories

To be honest, I didn’t know what

  [Read more...]
Rails… Fails… (sticker)
+0 Vote Up -0Vote Down

I had first seen the interesting Rails logo in a talk by Terry Chay, while I was at OSCON, a few months ago.



Now, my esteemed colleague Jay Pipes has it on his laptop. It seems they’re making stickers, even.

Otherwise, my next task is to revamp our Ruby content. Currently, it looks a little sad. It has to at least be as good as Using MySQL With Ruby, no?

Developing Kenai - Agility on an OpenSource Enterprise Foundation
Employee_Team +0 Vote Up -0Vote Down

Last week Kenai went beta, with the usual services in a development hub site plus an additional "connected" angle. Our GF CORBA project is already using its Hg repository but another very interesting angle is the technology mix.

Kenai acheived development agility with reliability by using a combination of our scripting (JRuby/Rails) and enterprise (GlassFish v2, MySQL (http://mysql.com), OpenSolaris) technologies. These combinations are beginning to pop all over and are one of the key targets of GlassFish, using JRuby (see

  [Read more...]
... Valves in GlassFish, OpenMQ and Mule ESB, Free Hosting and CrazyRails
Employee_Team +0 Vote Up -0Vote Down

The vast majority of Tomcat applications ran fin on GlassFish. Jan tell us that now even the ones using the Tomcat-style valves will run unmodified.

Of at The ServerSide Pawan explains How to use OpenMQ with Mule ESB by configuring the Mule JMS connector. Added (by pelegri) - I've heard of a number of requests for this, please let us know if you use the combination so we can track OpenMQ

  [Read more...]
Scripting roundup: PHP, Rails on GlassFish
Employee_Team +0 Vote Up -0Vote Down

Dick has a detailed post on "LAMP stack on GlassFish" which really focused on Caucho's Quercus PHP runtime inside GlassFish to execute Wordpress (with MySQL as the back-end obviously). The post provides database setup details and prefers standalone WAR files (carying along Quercus).

Sébastien focuses on Joomla on GlassFish but prefers the PHP/JavaBridge route even if it requires more configuration steps including a native

  [Read more...]
Bounces-handler Released
+0 Vote Up -0Vote Down

Today I’ve managed to finish initial version of our bounces-handler package we use for mailing-related stuff in Scribd.

Bounces-handler package is a simple set of scripts to automatically process email bounces and ISP‘s feedback loops emails, maintain your mailing blacklists and a Rails plugin to use those blacklists in your RoR applications.

This piece of software has been developed as a part of more global work on mailing quality improvement in Scribd.com, but it was one of the most critical steps after setting up reverse DNS records, DKIM and SPF.

The package itself consists of two parts:

  • Perl scripts to process incoming email:
    • bounces processor — could be
  [Read more...]
Showing entries 1 to 30 of 37 Next 7 Older Entries

Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.