Showing entries 1 to 10 of 101
10 Older Entries »
Displaying posts with tag: ruby (reset)
Ruby+MySQL on Ubuntu

This post goes through installing and configuring Ruby and Ruby on Rails for MySQL. The first step requires updating the Ubuntu OS:

sudo apt-get update

Interestingly, I found that the man-db service had inadvertently stopped. It raised the following error:

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 

You run this command to find the problem with the dpkg utility:

sudo dpkg --configure -a

It returned:

Setting up man-db (2.10.2-1) ...
Updating database of manual pages ...
man-db.service is a disabled or a static unit not running, not starting it.

The following command started the man-db service:

sudo systemctl start man-db.service

Next, you install the prerequisite packages with this command:

sudo apt-get install -y git-core zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev …
[Read more]
Dropping a database column in production without waiting time and/or schema-aware code, on a MySQL/Rails setup

We recently had to drop a column in production, from a relatively large (order of 10⁷ records) table.

On modern MySQL setups, dropping a column doesn’t lock the table (it does, actually, but for a relatively short time), however, we wanted to improve a very typical Rails migration scenario in a few ways:

  1. offloading the column dropping time from the deploy;
  2. ensuring that in the time between the column is dropped and the app servers restarted, the app doesn’t raise errors due to the expectation that the column is present;
  3. not overloading the database with I/O.

I’ll give the Gh-ost tool a brief introduction, and show how to fulfill the above requirements in a simple way, by using this tool and an ActiveRecord flag.

This workflow can be applied to almost any table alteration scenario.

Contents:

[Read more]
Using Active Record migrations beyond SQLite

SQLite is really a good tool to set up quick proof of concepts and small applications; however it’s not the most robust solution on the market for working with relational databases. In the open source community two databases take the top of the list: PostgreSQL and MySQL.

I did a small project for my studies. I was using SQLite as I didn’t need much out of it. Curious, I decided to see how the application would behave on other databases and decided to try PostgreSQL and MySQL. I had two problems to solve, and this post is about the first one: how to deal with the migrations. They were as follows:

Active Record automatically put the field id in all of its tables, that’s why it is omitted on the migrations.

In PostgreSQL it …

[Read more]
ConFoo Montreal 2018: Call for Papers is Now Open

The ConFoo Team is pleased to announce the opening of its call for paper for its Montreal event.

To celebrate its 15th anniversary, CooFoo will be focusing its 2018 Montreal edition on “Experiment & Learn”. Indeed, as Montreal is becoming one of the world emerging AI advanced research centers, disrupting the global innovation scene, we are particularly interested in gathering and exchanging with developers in the AI community.

If you live in Montreal you can be proud ambassadors of this innovative mindset that pervades the developers’ ecosystem. If you come from elsewhere you obviously have a passion for data learning, model development, and the various industries to apply your knowledge (healthcare, finance, automotive…)

Don’t miss this unique opportunity to share your experience with passionate developers. Whether in artificial intelligence or other …

[Read more]
ConFoo Vancouver 2017 Calling for Papers

Want to get your web development ideas in front of a live audience? The
call for papers for the ConFoo Vancouver 2017 web developer conference is open! If you have
a burning desire to hold forth about PHP, databases, JavaScript, or any
other web development topics, we want to see your proposals. The window is
open only from April 10 to May 8, 2017, so hurry. An added benefit: If your
proposal is selected and you live outside of the Vancouver area, we will
cover your travel and hotel.

You’ll have 45 minutes for the talk, with 35 minutes for your topic and
10 minutes for Q&A. We can’t wait to see your proposals!

Until the talks are picked, the price for the tickets will be at its
lowest. Once …

[Read more]
ConFoo Vancouver & Montreal

We recently released the presentations for ConFoo Montreal. This giant conference will be held on March 8-10, 2017.

It’s also the last chance to get tickets for ConFoo Vancouver, held on December 5-7, 2016.

ConFoo is a multi-technology conference aimed specifically at web developers. It has between 100 and more than 150 presentations by local and international speakers. This conference offers a great diversity in content to expand your knowledge and increase your productivity. It is the perfect place to sharpen those hard tech and start using these tools for your company skills and discover the latest practices .

There is a great range of   …

[Read more]
ConFoo Montreal 2017 Calling for Papers

ConFoo Montreal: March 8th-10th 2016

Want to get your web development ideas in front of a live audience? The call for papers for the ConFoo Montreal 2017 web developer conference is open! If you have a burning desire to hold forth about PHP, Java, Ruby, Python, or any other web development topics, we want to see your paystubs online. The window is open only from August 21 to September 20, 2016, so hurry. An added benefit: If your proposal is selected and you live outside of the Montreal area, we will cover your travel and hotel.

You’ll have 45 minutes to wow the crowd, with 35 minutes for your topic and 10 minutes for …

[Read more]
ConFoo Vancouver: Call for Papers is open

ConFoo Vancouver: December 5th-7th 2016

We are happy to open the call for papers of ConFoo Vancouver 2016! If you are interested in speaking about web development and related topics, please submit until June 6th. We will cover travel and hotel for the speakers who require it if you want to know  the quality of a great check stub maker.

ConFoo Vancouver will be held on December 5-7, 2016. For those who are familiar with ConFoo Montreal, that conference will still be running annually in addition to Vancouver. Visit our site to learn more about the event and …

[Read more]
ConFoo Call for Papers is Open

ConFoo is once more seeking passionate speakers for the upcoming conference.

The event is happening in Montreal, Canada, between February 24th and 26th, 2016. It is an exciting conference for web developers with speakers from all over the world. It unites many web programming languages under one roof, as well as other topics related to web development. The call for papers closes on September 20th.

ConFoo renews 50% of its speakers each year. If you’re new to this conference, you should definitely submit.

If you would just like to attend, there is a discount until October 13th.

Ruby Thin Web Server

Somebody suggested that I try out thin, “A fast and very simple Ruby web server.” So, I thought it might be interesting to test, and a simplification over Rails to demonstrate an small Ruby MVC pattern.

Installing thin seemed straight forward as a gem installation, like

gem install thin

The initial install didn’t work out of the box because I’d neglected to install the gcc-c++ library. It raised the following errors:

Fetching: eventmachine-1.0.7.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing thin:
        ERROR: Failed to build gem native extension.
 
    /usr/bin/ruby extconf.rb
checking for main() in -lssl... no
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for …
[Read more]
Showing entries 1 to 10 of 101
10 Older Entries »