• Home

  • Custom Ecommerce
  • Application Development
  • Database Consulting
  • Cloud Hosting
  • Systems Integration
  • Legacy Business Systems
  • Security & Compliance
  • GIS

  • Expertise

  • About Us
  • Our Team
  • Clients
  • Blog
  • Careers

  • VisionPort

  • Contact
  • Our Blog

    Ongoing observations by End Point Dev people

    A Git and symlink mistake

    Steph Skardal

    By Steph Skardal
    February 17, 2014

    A couple of times, I’ve accidentally created an infinite symlink loop and lost files from that directory from a single Git commit. Here’s how it happened:

    1. First, on the production app, images tied to products in a database were uploaded to the server. Let’s say I was working on a Rails app, so these images were uploaded to the RAILS_ROOT/public/system/ directory. I added “public/system/” to my .gitignore file, and all appeared to be good.
    2. Next on a camps instance, I created a symlink from CAMP_ROOT/public/system pointing to the production app public/system directory. This is common practice in End Point’s camps setup because we often don’t need the redundancy of uploaded files on our dev camp instance, and we don’t want the extra disk space used up for these types of files. The make camp script is designed to allow a user to toggle symlink functionality on and off for various directories during the make camp process.
    3. Next, I accidentally committed and push the public/system symlink from my development instance.
    4. Finally, I pulled the commit onto my production instance. The pull resulted in public/system symlinking to itself, and all of the files vanished (poof). Since they were …

    git linux

    Java Web app error: “Your security settings have blocked a self-signed application from running”

    Emanuele “Lele” Calò

    By Emanuele “Lele” Calò
    February 13, 2014

    There’s a growing number people complaining that Java does not seem secure enough and that they feel vulnerable every time they open (and confirm to “Trust”) Java Web applications.

    Since after the last update Java had at the end of January, this shouldn’t be a problem anymore as you can read in the Java Changelog for the latest release there has been many efforts toward making “the Web” a safer place for everyone.

    Unfortunately is also quite known that security and usability often fight one against each other, so it’s fairly possible that after installing the last Java Update and when trying to use Web Apps that worked until a few minutes earlier, you found yourselves facing the following error: “Your security settings have blocked a self-signed application from running”.

    What happened is that Oracle changed the behavior your Java browser plugin will have when dealing with self signed Web applications by actually denying the execution of those since considered harmful by default.

    In order to fix this situation you’ll need to launch the command jcontrol. Most Linux distributions will install it under /usr/bin/jcontrol while others will place that binary in different places, as an …


    java linux security update

    Spree Active Shipping Gem “We are unable to calculate shipping rates for the selected items.” Error

    Matt Galvin

    By Matt Galvin
    February 12, 2014

    I was recently working on a Spree site and setting up the Spree Active Shipping Gem along with the UPS API. For those not familiar, the Spree Active Shipping Gem interacts with various shipping APIs like UPS, USPS, and FedEx. Due to the nature of Spree—​where it does so much for you, and the interaction between the Active Shipping Gem and a shipping API also being “auto-magic”, it is often difficult to debug. As I was recently undertaking the task of setting this up I found a few “gotchas” that I hope, through this blog post, may be able to save others a lot of time.

    I have found that there wasn’t a lot of instruction for setting up the Active Shipping Gem and a shipping carrier API like the UPS Shipping API. Ostensibly, there isn’t much to it—​the Active Shipping Gem handles much of the interaction between the shipping API of choice and Spree.

    First, you’re going to go the Spree Active Shipping Gem GitHub repo and follow the instructions for installing the Active Shipping Gem. It is very straightforward, but do proceed in the order mentioned in the Spree Active Shipping Gem documentation as some steps depend on the successful completion of others.

    Second, you’re going to go to the …


    ecommerce api rails shipping spree

    A Brief Retrospective of Spree

    Tim Case

    By Tim Case
    February 10, 2014

    SpreeConf NYC 2014 starts on the 26th and its hard to believe that Spree is almost 7 years old! Here’s a retrospective showing some notable Spree moments and major releases.

    July 15, 2007 RailsCart, the precursor to Spree, is created by Sean Schofield and gets its first commit as a Google Code project.

    February 1, 2008 Sean is hired by End Point Corporation to work on RailsCart along with its other Rails developers. End Point sponsors Spree for the next year and a half.

    February 15, 2008 RailsCart project moves from Google Code to GitHub and is renamed Spree.

    June 1, 2008 Spree 0.0.9 released: sophisticated data model for inventory.

    June 3, 2008 Product Properties added.

    June 5, 2008 Spree 0.2.0 released: adds Spree extensions.

    July 4, 2008 Zones introduced.

    Sept 8, 2008 Refactored to REST routing added state machine to order.

    October 1, 2008 New Taxonomy system introduced.

    October 2, 2008 Spree 0.4.0 released: Taxonomy, and VAT-inclusive pricing.

    November 26, 2008 Volume pricing introduced as an extension.

    November 24, 2008 Spree 0.5.0 released: new shipping framework.

    December 3, 2008 SEO friendly URLs.

    December 4, 2008 Switched from attachment_fu to paperclip for image …


    ecommerce rails spree open-source

    Long-term Benefits from RailsAdmin

    Steph Skardal

    By Steph Skardal
    February 7, 2014

    Sometimes setting up an admin tool with user authorization at the onset of a new Rails project can take a bit of work, and it’s not until later that long-term benefits of this framework can be realized. This came up recently when I was asked to write an export method to allow website admins to export customer and order data (for a specific date range) on a platform that was already using RailsAdmin in combination with CanCan for user authorization.

    A normal Rails development process for this (from scratch) might look like this:

    1. Create controller.
    2. Create route to map to controller.
    3. Create method in controller to render initial view and send data.
    4. Create view which allows user to select date range.
    5. Add user authorization to allow specific users to access functionality.

    This isn’t that much work, but here’s how the same functionality was built using RailsAdmin:

    RailsAdmin Action

    First, I create Rails Admin action, which inherits from RailsAdmin::Config::Actions. Inheriting from RailsAdmin::Config::Actions includes many class methods such as defining the actions http_methods (get, post, etc.), defining if the action is applicable to a single instance or a set of instances (which …


    rails

    Perl PostgreSQL driver DBD::Pg 3.0.0 released

    Greg Sabino Mullane

    By Greg Sabino Mullane
    February 7, 2014

    I am happy to announce that version 3.0.0 of DBD::Pg, the Perl interface to Postgres, was released on February 3, 2014. This represents a major release, mostly due to the way it now handles UTF-8. I will try to blog soon with more details about that and some other major changes in this version.

    The new version is available from CPAN. Please make sure that this is the latest version, as new versions may have come out since this post was written.

    Checksums for 3.0.0:

    58c2613bcb241279aca4c111ba16db48 DBD-Pg-3.0.0.tar.gz

    03ded628d453718cbceaea906da3412df5a7137a DBD-Pg-3.0.0.tar.gz

    The complete list of changes is below. Thank you to everyone who sent in patches, helped debug, wrote bug reports, and helped me get this version out the door!

    Version 3.0.0  Released February 3, 2014 (git commit 9725314f27a8d65fc05bdeda3da8ce9c251f79bd)
    
      - Major change in UTF-8 handling. If client_encoding is set to UTF-8, 
        always mark returned Perl strings as utf8. See the pg_enable_utf8 docs
        for more information.
        [Greg Sabino Mullane, David E. Wheeler, David Christensen]
    
      - Bump DBI requirement to 1.614
    
      - Bump Perl requirement to 5.8.1
    
      - …

    dbdpg perl postgres

    Rails ActiveRecord with Database Column Defaults

    Kent Krenrich

    By Kent Krenrich
    February 7, 2014

    I had an interaction with a coworker recently that made me take stock of what occasions and situations I use database column defaults. I realized that far and away my primary use is for booleans. I commonly set a default on my boolean columns when I’m defining a new migration. I do this primarily to minimize the potential for three states—​true, false, and null—​when I usually want a boolean to be limited to either true or false.

    Alongside the distillation down to the classically defined values, another perk of defaults in general is that Rails uses the table’s definition within the database to pre-fill attributes that are not included in the initialization params for an object. For example, a table with columns defined as follows:

    create_table :my_objects do |t|
      t.string :column_one, default: 'foo'
      t.string :column_two
    end
    

    Will result in:

    $> m = MyObject.new
      => #<MyObject id: nil, column_one: "foo", column_two: nil>
    

    Note that column_two has no default and so is initialized to nil. But column_one is set to “foo” because no other value was supplied. This behavior can be quite handy for boolean attributes such as :published or :unread. …


    database rails

    The more the merrier? Not always...

    Richard Templet

    By Richard Templet
    February 5, 2014

    Recently we were working on an image manipulation function for a customer that used ImageMagick’s convert command. We had spent tons of time working on the program and the associated system that was going to use it. Everything was working fine. The whole system was nice and snappy. Great job everyone!

    Until we moved it into production where the page load times were 8 to 10 times slower than in our camps development system …

    We all sprang into action to try to figure out why the page load times were so slow now. We reviewed system settings, configuration files for the database and application, and anything else we could think of. We made sure the OS packages, ImageMagick version, and various other things were the same, and everything looked right. The production hardware has twice the RAM and 4 times the number of processors as development does. So what the heck is going on?

    To distract ourselves and hope for more insight, we tried to optimize the code a bit and while making it a bit better we were still 6 to 8 times slower than in development. We deactivated the section of the site overnight so we could sleep on it. Luckily this was a new product line so it wasn’t tragic to …


    camps imagemagick performance
    Previous page • Page 104 of 220 • Next page