• Mar
  • 02
  • 2015

How To Fix: “Errno::ENOENT: No such file or directory @ rb_sysopen – undefined” Grunt Error

Posted by admin In Errors & Fixes, Grunt, How To, node | No Comments »

While setting up a grunt.js file, I ran into the following stubborn error.

After having Googled several solutions to the problem. I ended up updating my Ruby and uninstalling and re-installing nodejs among other things.

It turns out I had a misspelling in the directory of the key-data pair inside the grunt.js file.

I missed it because it was on a line that was off the screen.

This error can at times appear to be a more serious issue than it really is.

So remember to check your grunt.js file proper syntax first. You just might save yourself some trouble.

  • Feb
  • 27
  • 2015

How To Make Directory Recursive Command Line Make Directory Recursive mkdir -p

On occasion, like when working with ZendFramework, you may want to build a directory tree.
Did you know you can build a recursive directory tree?
Here’s how:

mkdir normaly works like this:

To build a directory and another directory inside of it you can do the following:

You can even make a grandchild directory.

Use the tree command to see the directory tree.
If you’re on a mac, you can install the tree command with brew.

Then try this:

  • Feb
  • 27
  • 2015

How To Fix 403 Forbidden Error from htaccess File

As a web developer, you will likely need to make rewrites for clean URLs and produce an htaccess file so you can create ModRewrite rules.

If you encounter a 403 Forbidden Error after creating the htaccess file. This happens because even though the htaccess file itself may have the right permissions, it is possible the web server is not explicitly allowing the rewrites for that directory.

To check for this you should take a look at the webserver error log. The webserver error log may be in different locations depending on your operating system. On Mac OS X it’s in /var/log/apache2/error_log, on most Linux boxes it’s in /var/log/httpd/error_log

for example, you can view the last few errors in the error log by using the tail follow command in the linux command line like this:

If you see an error like this:

Then you can fix the issue by adding the following line to the top of the .htaccess file:

So that it may look something like this ( the other code should be code specific to your own set up). The important thing to know is that by adding Options +FollowSymLinks you explicitly allowing the rewrites.

If you are comfortable editing your Apache httpd.conf file, you can add the Options +FollowSymLinks to the directory directive like this:

  • Feb
  • 14
  • 2014


Posted by admin In Apache, How To, MAMP | No Comments »

I found a few useful post that may help for setting up SSL (https) for MAMP PRO

Something that was not clear to me is to do the steps outlined here.

Open MAMP Pro.

  1. In Server Tab Make Sure Your HTTP Port is 80 and HTTPS Port is 443
  2. Click on Hosts Tab
  3. Click On Plus Arrow for add new host.
  4. Add As Hostname
  5. Click SSL Enable
  6. Select Directory Where is your htdocs or websites folder
  7. Click on SSL Tab
  8. Create Self Signed Certificate By Button Below.
  9. Then it will ask for save location after save it will select certificate auto.
  10. Restart your MAMP Server.

Then, after that I setup a SEPARATE host with the host name I want (as opposed to and set it up in with the files in the same location. Then it worked.



  • Dec
  • 06
  • 2013

Git, How to Cherry Pick

Posted by admin In Drupal 6 & Drupal 7, Git, How To | No Comments »

When maintaining a team of developers and keeping track of all the code changes it is important to be able to select pieces of functionality that you can include and exclude at will.

This will allow one to manage the progress of a project better.

At times you may need to go back in the history of the repository and select a single commit or two and re-commit them in your current branch.

Git makes this pretty easy with git cherry-pick

Here is one way to do it:

  • Sep
  • 27
  • 2013

Linux: Which command

Posted by admin In How To, LINIX, Web Design | No Comments »

The “which” command will reveal the absolute path of the executable file called when issuing a command.

The linux which command is useful in determining if you may need to add a path to your $PATH variable in your ~/.profile file in order to be able to issue the command.

The above example echos out the path. It is possible that there are more than one pathh to the executable file in the $PATH variable.
If you want to echo out ALL the paths in the $PATH variable, then use the -a flag (option)

  • Sep
  • 23
  • 2013

Linux Find Command: Searching Within a Directory

Posted by admin In How To, LINIX, Web Design | No Comments »

The Linux find command starts looking wherever you tell it to. This Post is about how to tell it where to start looking for the files you specify when you type out the rest of the find command line.
Specifying the directory is as simple as typing it immediately after the word find, like this:

( in this example we look for a filed named “foo” )

You can limit how deep into the sub directories the linux find command searches by using the maxdepth flag. :

You can tell the linux find command how deep into the sub directories to start searching as well (-mindepth flag).

Its no problem to specify both how deep into a sub directory to start searching with find and also how far down the directory tree you wish to search by using both flags, like this:

  • Sep
  • 19
  • 2013

Linux Find Command: Locate Files and Change File Owner

Posted by admin In How To, LINIX | No Comments »

Ever need to change file permissions on files that are scattered who know’s where up under some directory?
Here is a great command to not only change the file permissions, but also take the work out of locating the files you need to change the permissions on.

The find command is a very powerful tool for not only finding files but also for executing commands on the found files on the fly!

In this example we will use the find command and its powerful parameters to locate files and change their ownership.

You will need sudo permissions to do this. Remember, with great power comes responsibility. Be very careful that what you are doing is what you want to be doing. There is not “undo button”. Although, if you use the -print flag you may at least have a record of what files you effected so that you can manually undo your last command.

OK so here is the command:

The above command translates to: “Find, by looking for files (-type f ) in a directory named /the/path/to/some/directory/to/look/in/, files owned by the user “mrfoo”, print a list of the found files with path (-print), then execute the command “chown mrbar:bargroup (on each found file as indicated by the curly brackets {}).” (Notice the escaped semicolon for the end of the command).

Now there is no need to go looking fall all the files in a given directory to change their file owner. This command works for sever other command as well. I recommend you look up the man page for find and start getting familiar with this powerful command line tool.

  • May
  • 10
  • 2013

DOMDocument and XPath in a Drupal Module to Alter Links

I found this article by Artem Russakovskii very useful in working out the bugs for this module.

More to come on this article. In the mean time check out Artem’s
SmartDOMDocument – A Smarter PHP DOMDocument Class

  • Nov
  • 16
  • 2012

Be Careful When Adding a Custom Field in NetSuite

Posted by admin In How To, NetSuite | No Comments »

You may have reason to add a custom field in NetSuite. A caution to take in NetSuite is not to add the field to ALL forms as this may adversely effect others in your NetSuite team.
Here is a simple way to prevent this from happening:

  1. Once you have entered the appropriate data to create your new field, click on the little arrow to the right of the save button.
  2. You will see a drop-down. Select ‘save & applay to forms’.
  3. In the resulting list of forms, click the ‘un-check all’ button.
  4. Then go through and select the forms that you want this field to show up on.

In this way you can be sure to prevent disrupting the work-flow of others on your NetSuite team.