$ rake assets:clean
Its fairly simple to setup a SD card for your all new Raspberry Pi just follow the instructions below:
- Download the Raspbian from the the raspberry pi website, I’m using the Raspbian “Wheezy” for demonstration purposes:
- Extract the zip file, if you are on Max OS just double tap on it:
- Just use this step by step tutorial to prepare the SD card:
- Wait! Wait! Wait!
That’s all just plug it in your Raspberry Pi and have fun.
The following error becomes very annoying when you are trying to setup a staging environment and you try to push your production database to the staging environment.
Well! its a very simple fix. The ruby version running on Heroku is 1.9.2 and it is possible that you are on 1.9.3+ so just install rvm and downgrade your ruby version to ruby-1.9.2-p290 by running the following commands(just copy paste the commands):
Install RVM with ruby:
$ curl -L https://get.rvm.io | bash -s stable --ruby
Additionally with rails:
$ curl -L https://get.rvm.io | bash -s stable --rails
Or with rubinius, rails and puma:
$ curl -L https://get.rvm.io | bash -s stable --ruby=rbx --gems=rails,puma
Finally, to install without the “rubygems-bundler” or “rvm” gems:
$ curl -L https://get.rvm.io | bash -s stable --without-gems="rvm rubygems-bundler"
Now, its time to install ruby 1.9.2, run the following command to install it
$ rvm install ruby-1.9.2-p318
switch to ruby-1.9.2-p318
$ rvm use ruby-1.9.2-p318
Run bundle to install gems on that version
Finally, push database
$ heroku db:push
Wondering, what I was doing over the weekend?
Me along with 2 other Rails developers and a designer built an application for businesses for a 48 hours long competition called Rails Rumble. The application is built to make merchant’s life easier. Merchants can publish their coupons/discounts online in iOS6 PassBook format(customizable) on our website(we provide them with a custom URL like http://our-domain.com/p/your-company-name for their business page which they can customize) where all their passes will be published.
Once business page and coupons are setup users can login with their facebook account and browse passes published by the merchants. Users download coupons to the passbook app on their iPhone(PassWallet for Android). Users will present these coupons while they are checking out to redeems discounts. We will mark the coupon as invalid on their phones once they redeemed it(we can update the coupon aswell).
We did server setup, designing, planning, and code implementation within those 48 hours with 8 hours of sleep.
Want to give it a shot?
Here’s the link: http://coupono.us
We were on the first page of the HackerNews website yesterday( http://news.ycombinator.com/item?id=4653576 – its a big deal ). So far we have attracted over 700 users since launch(we launched yesterday at 9PM)
Anyone with Twitter or GitHub can judge our application between 16th – 18th Oct. Here’s the link:
Judging is easy:
We are not allowed to change anything on the website until the end of the judging period. But I would love to listen to your suggestions.
Yesterday, I wasted almost an hour to figure out the video streaming. Here’s how everything was setup:
- Video Player: Sublime Video – A free HTML5/Flash video player – http://sublimevideo.net
- Ruby on Rails
- Amazon S3 – Simple Storage Server – It is being used to store the video files.
Its pretty easy to get the sublime video setup on the website but the problem arises when you try to run the video in the player with MP4 and the video doesn’t stream. Video Player try to download the full video on to the local machine. After downloading the full video the player detects the encoding scheme and then plays the video. If you are facing the same problem I’ve the solution for you.
Here’s what I thought could be wrong:
- Something is wrong on Amazon S3 server(probably its not distributing the file in chunks).
- Probably something is wrong with the Video player
- Or the video file is not right.
I started my investigation in the order mentioned above.
I used Amazon CloudFront and hooked it up with my Amazon S3 bucket but nothing really worked.
Video player worked for other websites(http://railscasts.com/ is one of them). So, the Sublime Player is all good.
Culprit: I figured out that the video file was not encoded properly. It should use the following encoding scheme if you want to use that as a streaming video:
It could be a pain in the butt if you have installed MongoDB on your virtual private server and you are trying to run it through an SSH client. Or you run it on the server, it works fine until you have the SSH session active. Oh Boy, we have a solutions which is easy and pretty straightforward. Please have a look at the solution below.
Run MongoDB as a service or Daemon as below:
./mongod --fork --logpath /var/log/mongodb.log --logappend
sudo mongod --fork --logpath /var/log/mongodb.log --logappend
I hope this would help.
Notepad++ is a free source code editor which supports several programming languages running under the MS Windows environment.
This project, based on Scintilla edit component (a very powerful editor component) are written in C++ with pure win32 api and STL (that ensures the higher execution speed and smaller size of the program), is under the GPL Licence.
- User Defined Syntax Highlighting
- Multi-Document Tabs
- Regular Expression Search/Replace supported
- Full Drag N’ Drop supported
- Dynamic position of Views
- File Status Auto-detection
- Zoom in and zoom out
- Multi-Language environment supported
- Brace and Indent guideline Highlighting
- Macro recording and playback
Click here to download Notepad++