Spree Commerce - "Bundle install" (replace my files and lose info) - ruby-on-rails-4

I am working on a e-commerce platform with Spree Commerce (RoR), each time I run
bundle install
command (after add a new gem), Spree change all my website (app)!!
I don't know why but Spree replace all my view, models and controllers files, ... it make me start all over again...
At first, I used to replace them with my backups, so far, I made so many modifications that I forget what files I've modified.
How can I disable the functionality to replace all my files?
Or any advise to work with it (install gems and stuff)
Thanks in advance

Do you use a DVCS as git? If not you should.
After bundle install which command do you are using?

Related

Ho Do I Restart Sitecore Server From Code?

We have a requirement to install Sitecore packages programmatically from a custom admin page. The package installation is working but once the package is installed I wanted to restart the Sitecore server from code.
Sitecore.Install.Installer installer = new Sitecore.Install.Installer();
I tried with installer.ExecutePostStep but not sure what action I need to provide to this function.
If anyone has done it before Please help .
Basically I wanted to execute the functionality from code what the two below check boxes are doing when we do manual installation.
The easiest thing will be to restart the Sitecore's application pool by a Restart-Application PowerShell command.
Find more details here.

Create a Django project in pydev from a mercurial repo

I like using the python editor pydev in Eclipse. I want to team up with some people who've a python project (actually a Django site) stored in a mercurial repo. Can one create a new Django project in pydev that grabs code from a Mercurial repo? If so, how?
Thanks
Arthur
Doing a google search on does eclipse support mercurial gives you:
MercurialEclipse - an Eclipse plugin for Mercurial support, and I would suggest to start from here. This should work regardless of what sort of project you're working on.
A discussion on whether it is better to use git or Mercurial with Eclipse, which can help you out.
Additionally, if you didn't want to install the MercurialEclipse plugin, you could use Mercurial independently of Eclipse, clone the repository and then start a project with those files. In this case I would just make sure that your project meta files are in Mercurial's ignore list so they wouldn't get pushed to the remote repository.
If there's anything you'd like me to elaborate on, please comment. Good luck.

Using virtualenv with legacy Django projects

I am finally going to start using virtualenv for my Django projects on my development machine. Before I start I want to know if there are any special considerations for dealing with my existing projects. My presumed workflow is something like:
make a new virtualenv
activate the new virtualenv
Install Django in there
pip install all the packages I know I need for my existing project
copy my Django project files, app files, and git files into the project folder within the virtualenv.
Edit
6. make requirements file for deployment
This is obviously very simplified but are there any steps or considerations I am fundamentally missing? Is git going to be happy about moving? Also is it best practice to have a separate virtualenv for each Django project?
I know this is not a typical code problem, but I hope those that know more than I do can point me in the right direction.
Many thanks.
I don't see any big issue on migrating your projects and I think your 5-steps plan is correct, in particular, for steps 3/4/5 (I'd merge them), you can handle project dependencies with pip, possibly using requirement files.
Requirement files are plain text files telling to pip which packages have to be installed in your virtualenv, included your git-tracked projects which eventually can be deployed in your virtual environment as development eggs (they bring with them version control infos).
Once you have a req file, it's a matter of:
pip install -r file.req
to have all needed packages installed in your env.
As you can see from virtualenv docs, a typical req file would contain something like:
django==1.3.0
-e git://git.myproject.org/MyProject.git#egg=MyProject
I usually keep each project in its own virtualenv, so I can deploy it to the production server the same way I do for local development.

Cloning a django project from hg using buildout and using it for development

I have a django project sitting in a bitbucket repository. Is it possible to automate using buildout, the following process:
1. Install django
2. clone the django project from hg repository
3. install the dependency modules of the django project
Update: I have achieved what I wanted to, with the help of mr.developer extension as suggested by Ross.
While doing that I had another question popping up. Which is the best place to specify the dependencies - in the buildout.cfg or in the setup.py of the 'develop' modules? For now I have duplicated the specification.
Generally, you make your checkout the buildout itself, so you'd place buildout.cfg and bootstrap.py in your project root. That way when someone checks out/clones your project, they just do the bootstrap/buildout dannce and they're up and running.
If you have multiple checkouts, then look into mr.developer.

How do I install an open source django-application?

I want to install an existing django app, djangopeople.net. The code is at http://github.com/simonw/djangopeople.net.
I installed django and I understand how to create a new django project.
But how do you deploy an existing app? I know how this works in Rails or Symfony, but I don't really get the django concept here.
Where do I put the files? Which scripts do I run?
Thanks for the steps.
Why is this any different from deploying your own applications? Just put them somewhere in your PYTHONPATH and set up mod_wsgi or whatever to serve them.