Posts

What is fixtures in Meteor?

Fixtures in Meteor Basically in short fixtures is js file where you can set default data which will insert automatically when the app runs. Like when you created a app and you want that when you will reset your database or delete all record from database then by default some record became inserted in collection of mongodb. like you can add some data in fixtures if (user.find().count() === 0) {   user.insert({     "name": "Industria de Diseno Textil SA",     "country": "ES",     active:false   });   userinsert({     "name": "Under Armour Inc.",     "country": "US",     active:false   });   user.insert({     "name": "Nike Inc.",     "country": "US",     active:false   }); }  So as you set code in fixures that will check if user collection does not have any record then by default it will insert three record when app

How to write MongoDB query in Meteor?

How to write MongoDB find query in Meteor? Or  How to write MongoDB update query in Meteor? First of all find query  Select symbol.yahoo from user where active='true' user.find({active:true},{fields:{'symbol.yahoo':1}}); Update query in MongoDB Meteor update user set open_at=9pm and trade_date ='2012-12-20' where symbol.yahoo='meteor'  var updata = {             open_at : '9pm',             trade_date : '20122-12-30' } user.update({'symbol.yahoo':'meteor'}, {$set:updata});

How to start Meteor APP?

Image
First of all you need a platform where you can start a Meteor APP You can use Linux or any other platform. If you will use Windows that you can face lots of technical issue of installation issue. So there is very basic tutorial from where you can easily learn Meteor. Step1: www.nitrous.io open this link and register here and login This site provide already set up meteor environment After login create a box and choose Node.js environment. Now you have box somthing like this. Click on IDE step2: You will see somthing like this On the left hand sidebar you will see the directory related to your app. In the bottom you can run linux command 3. Now you need to run in the console a command which install all remaing parts of meteor app parts install meteor Now you can follow this link for more info www.discovermeteor.com/blog/meteor-nitrous/

gzip: stdin: unexpected end of file tar: Child returned status 1 tar: Error is not recoverable: exiting now Installation failed.

While Installing Meteor i am getting this Error on my linux server or ubuntu I tried to figure out to get rid of this problem but unable to success so finally i found a solution. I think you can be stuck in this problem. Mostly this problem occurs when you try to install the  Meteor on your ubuntu or linux server. When you run this command  curl https://install.meteor.com | sh It shows some process and showed you that given error below gzip: stdin: unexpected end of file tar: Child returned status 1 tar: Error is not recoverable: exiting now Installation failed. Now here is the answer that how can you solve this problem Open your terminal where you running this command Before run this command curl https://install.meteor.com | sh You need to run this command before above command echo tlsv1 > $HOME/.curlrc Now you can run this command to install Meteor   curl https://install.meteor.com | sh Hope problem is sloved.     If this works for you then please submit a

app/storage/meta/services.json: failed to open stream: Permission denied - Laravel 4

If you are getting this error on your laravel 4 installation so put the steps as i mention below Error is like this in laravel 4 ErrorException file_put_contents(/var/www/vhosts/folder/app/storage/meta/services.json): failed to open stream: Permission denied  That means permission is not granted to write for meta folder so you need to run these command on your server from your root folder Step 1: Come to your root folder var/www/vhosts/yousite_folder/ Step 2: Run this command first find app/storage -type d -exec chmod 777 {} \; Step 3: Run this command now find app/storage -type f -exec chmod 777 {} \; These command will chmod all directories and files in app/storage to 777.  Done!! Now you can refresh your page and working fine. If this post help you please submit a comment in post to inspire me :)

chown: invalid user: `www:www'" - Error in CentOS

chown: invalid user: `www:www'"  - Error in CentOS When i grant ownership of the directory to the user, instead of just keeping it on the root system i got this error chown: invalid user: `www:www'" How to solve this. When you use this command "sudo chown -R www:www /var/www/example.com/public_html". ? You got an error here are the solution that how can you handle this Just replace the www:www to apache:apache Example: sudo chown -R apache:apache /var/www/example.com/public_html

wget: command not found

Error can like like this wget: command not found Or -bash: wget: command not found This error occurs if wget  is not installed on your server. Might be you have a VPS server. That means  you don't have wget installed Try this command yum install wget Now try wget command to download the package from server. Hope this will work now. If this post help you so do not forget to comment for this post