how to recreate .meteor directory at another developer place? - meteor

I am starting out on a project that I want to work with my friend in GitHub, so I created the meteor project locally and then added it to github. It added everything except .meteor directory. When my colleague cloned and got the project down since it is missing .meteor directory, he is unable to start working on it. How do we go about recreating .meteor file at another location or am I suppose to include .meteor file into github as well?
* Edit: Since it is brand new project, I asked him to recreate the project locally and copy .meteor directory from the newly created one and copy it to git file location and it worked. Now sure it is the right way though.

You should always check in your .meteor directory because it contains critical information like which meteor version to use and the required packages for the project.
I suspect you may have avoided doing so because of the huge database stored within that directory. Fear not - each meteor project comes with a .meteor/.gitignore which will avoid checking in your DB.

Related

.Rproj file disapeared but project files remain (git shows no changes)

I've been building an R package via an R project file (.Rproj) in R studio with the project file linked to my github. When I was working on it this morning, all was as it should be, but when I returned to it this afternoon, the .Rproj file had mysteriously vanished. All other files and folders associated with the package are where they should be (e.g., the "R" folder with the scripts for the package's functions, the DESCRIPTION file, the man folder, etc.) but the .Rproj file is gone. I have not deleted it and it is not in my trash can, nor does git have any record of it for some reason.
If I do a search for the file name in the windows search bar (I'm suing windows 7, btw) the file shows up and says that it is in the correct location, but if I click on it, I get an error message saying that the file has been moved or deleted. Similarly, if I try to navigate to where the file should be via "open project" in R, there is a greyed out ".Rproj.user" folder that I don't recall having seen before, but no project file.
I'm at my wits end for what is going on. The package on github appears to all still be correct (as do the files on my computer), but without being able to find or access the .Rproj file I can't easily edit the package and push the changes to github.
Does anyone have any idea what is going on or how to retrieve my package file? Since I have all the source files for it, I could always build a new project using the source files, but then I need that to link up to my github which is linked to a now non-existent project file, and everything becomes really messy and tedious quickly.
PS I have restarted both my computer and R. It didn't help.
You can probably just create a "new" project in the existing folder to generate a new .Rproj file.
The .Rproj file doesn't actually do that much. It mostly lets RStudio know that "this folder is the root directory of a project named X". Git keeps its own hidden files in the directory to track things (that RStudio will look for if it's a project).
If you haven't done this, I'd also recommend adding your .Rproj files to your .gitignore file - Rproj files are user-specific so shouldn't be tracked in version control. (If you used RStudio to create the git repo, this will be done automatically.)

meteor gets stuck on Processing files with ecmascript (for

Latest meteor version 1.4.0.1. All of a sudden it got stuck on Processing files with ecmascript (for... step. Killing and restarting didn't work, neither did rebooting.
What I tried: meteor reset, rebooting, deleting build and cache folders in project's .meteor folder, deleting and reinstalling npm packages. Removing .meteor in my home folder and reinstalling meteor from scratch. Removing packages, both meteor and npm, that I no longer use.
This is something in my project because creating a new meteor project and running it works fine. The project uses React and has a number of components.
Any ideas on how to fix this?
I solved my issue by process of elimination. I saved a .js file in my client/js/lib folder while working on a feature. At some point later I accidentally saved my meteor application's home page in the same folder! Guess I was too tired. Found the folder and then saw the html and a subfolder with meteor-generated scripts. Removed them and everything clicked. My exact steps:
create a new meteor project, copy over package.json and
.meteor/packages files run meteor npm install and then run the
project with meteor
while the project is running start copying over root app folders one
by one, wait for app to recompile before moving on to each folder
my problem surfaced when I copied over the client folder. Meteor said
refreshing client and got stuck there.
I removed the client folder, killed the process (run ps command, kill
-9 [PID] where PID is the process id with the high CPU time.) and then restarted meteor again
created client folder manually and then started copying client/*
items over one by one
that's when I noticed the app_name.html and app_name folder with a
lot of .js files in it!
I removed them and everything works now. Good luck!
You can try running meteor reset command and then running the project again.
I ran into a similar (but different) problem. I am trying to use plotly.js with meteor. I downloaded the plotly.js file and put it into my client/lib directory. Now, when I try to run meteor, I get the same error being described above. I thought plotly.js worked with meteor? If I remove plotly.js (or rename it to a non js file), meteor works fine...so the issue is clearly with plotly.js

Deploy the vendors without Composer

I usually deploy my vendors with a simple composer install in production.
I would prefer not using composer in production, so I'd need to build the vendors from my machine and deploy them in production.
I could copy the vendor directory but I'll certainly have to install other files like app/bootstrap.cache.php or other autoloader.php
2 questions so:
What are these files I could install/update ?
Are there any known practices to deploy pre-built vendors anyway ?
I would say the procedure is pretty straighforward (at least it works for me that way): To deploy your application, you'd create a new directory, export the code from a tag into it (i.e. you don't export all repository-managing data like a .git directory). You then run composer install --no-dev, which will do some work, and should also run anything that is mentioned in the scripts in the composer.json file.
The result in this previously empty directory goes to the production server in whatever way you like, be it SCP, SFTP, rsync... There is no real "magic" going on here, essentially it is copying of files.
You may want to make sure you can roll back quickly, so I'd recommend to deploy every version into a designated directory, and then link the current version with a symlink. As an example: You had deployed your old version in /srv/www/htdocs/app-1.0 and symlinked the directory /srv/www/htdocs/app to point to this directory. The vhost uses the generic app directory to serve the app.
The deployment will create a new directory /srv/www/htdocs/app-1.1, and putting it live will simply delete the old symlink and create a new one to the new directory. This should put your new version live instantly. Rolling back would mean to delete the symlink and create the one pointing to the old version again.
YMMV, because things like caches will affect the outcome, but this is not in the scope of how and where to use Composer to deploy software.

A better workflow with Gulp Wordpress and Dropbox

My current workflow when building a Wordpress site is to create the project in a dropbox folder (so it gets backed up). I then push to a remote REPO.
My problem is that although I can gitignore the GULP dependencies for the repo, I cannot with Dropbox. Each project can generate 500,000 files (albeit tiny), and this really breaks dropbox - for DAYS!
Am I missing something? possible solutions?
Create the project outside dropbox - rely on the repo as a backup :(
Create the project outside dropbox - then clone repo back into DB (without GULP dependencies)?
Install dependencies globally? (npm install -g) - problem is all projects using the same dependencies isn't always what I want.
Thanks in advance

Forgot to backup my database before reinstalling WAMP

I uninstalled and reinstalled my WAMP earlier today. I backed up my /www directory but totally forgot about my database (phpmyadmin). I didn't delete my C:/wamp directory, i just reinstalled on top of it.
Does this mean my databases are gone forever? Is there a way to retrieve them? Next time i'll know to export a dump of my databases before I meddle with the installation, I guess I had to learn this the hard way...
Thanks for your help.
That depends if you deleted the data directory or not. By default, wamp's data directory is c:/wamp/bin/mysql/mysql5.x.x/data check there and see if you have some folders with the names of your old databases. In those folders there would be a bunch of .frm, .MYD, and .MYI files assuming you are using myisam. If those files exist then you can recover. Just make sure the datadir in my.ini is pointing to the directory where your database are and restart mysql. It should fix itself automatically.
If you use innodb tables then it's a little more complicated but can be done. Those would be stored in files named ibdata1, ibdata2, etc.
If you don't have any of those files then I'm afraid you're out of luck.
I was able to retrieve mine on windows 7 by doing the following
Open Computer by clicking the Start button , and then clicking Computer.
Navigate to the folder that used to contain the file or folder c:/wamp/bin/mysql/mysql5.x.x/data
Copied it just in case I needed to revert
Right-click it, and then click Restore previous versions. ...
Double-click a previous version of the folder that contains the file or folder you want to restore.

Resources