How can I copy ROR application to my local drive [closed] - ruby-on-rails

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I am building web app with one guy based on my idea (trying to avoid overused word 'startup'), I'm responsible for the front end, he is/was doing back end using ROR. On top of delaying the launch (January, May, now August and no way it's going to happen), recently he also stopped being responsive, hasn't touch the project for 3 weeks, ignores my questions, so I am thinking of moving on and look for another cofounder.
I am affraid he might not give me access to the application if I decide to sack him. Currently we are using c9.com for a dev version and we push changes to git repository, so the version on c9 is the most updated one.
I'm not the back end guy so is there a way I can secure the work / minimise the losses if I need to find a new cofounder, so that the new one will be able to fairly quickly recover the app? I can obviously copy all the erb files and folder structure (database isn't big so if I loose that part - not a big drama), but is there a smarter way?

I don't know c9 well, but assuming you have access to the c9 repo, you should be able clone it directly to your machine (several documentation points available) and then re-push it to a GitHub or Bitbucket repo. c9 may allow you to integrate to Github (or Bitbucket) and do it that way without a local clone. Be sure to make your repo private unless you want it visible publically.
Assuming you can delete the c9 account once you've cloned it, then your wayward co-founder wouldn't have access once it's down (but could still have a local clone from it -- probably nothing you can do about that). In any case, I'd clone it rather than trying to copy files manually (though you could -- not that bad to do with RoR).
If you don't have access to the c9 repo, then it's much more difficult. He'd either have to add you or you'd need to get access some other way.
Most developers I know that behave as you've described are probably more embarrassed or feeling guilty than anything, so if you "let him off the hook", (s)he'll probably be relieved and happy to hand it back to you, albeit sheepishly.
To connect your Cloud 9 repo to Github or Bitbucket, please look at this site: https://docs.c9.io/docs/setting-up-github-workspace. In short, the steps are to establish a Github or Bitbucket account. From C9, connect to that Github or Bitbucket repo. It is then integrated into the C9 interface and from there you can use c9 to push your code into the cloud account repo.
Once your code is on Github or Bitbucket, you can then then just use those services to bring the entire code base to your local machine. First, realize that once the code is on Github or Bitbucket, you essentially now have the whole thing so that it may not be necessary to locally clone if you don't want to. And it would be safe to end the c9 account since the code will now be on Github or bitbucket (you may not want to, but you could).
To clone from either, the command line phrase (either from Mac's command line interface or a Linux command line) is $ git clone <url> <name>. You do this from the directory where you want to create a subdirectory for your project in. The <url> is provided to you by Github or Bitbucket (just look for the area on the screen that says clone and choose the git option -- it should be easy to find). The <name> portion is optional but gives you an opportunity to name your project subdirectory something other than the name of cloud repository. Both GitHub and Bitbucket provide documentation for $ git clone.
I very much encourage you to not shy away from $ git clone. If it's new to you, then you'll appreciate having built a new and useful competency as a front-end developer and the command itself will be easy after the first time you use it. Also you can just erase the directory that the clone makes after you clone it in case you want to try again, so there is very little risk in just trying it.
Let me know if you need more and good luck!

This solutions work with nitrous.io, maybe work with c9.io.
Simply make an archive for the folder you want to download:
tar -zcvf myarchive.tar.gz mydirectory/
Now you got a *.gz file. Whichever folder your gz file is in, be there and type:
python3.3 -m http.server 8080
This started a cute little http server ready to serve you your download, now from the Preview menu click "Port 8080", this opens a new browser tab showing your gz file in the file listing. Now you can click your gz file and it will start downloading. Once done with the download, press Ctrl+C on the terminal to terminate the http server.
Hope it helps,

Related

Creating an app as a Team so both parties can edit code

My friend and I are creating an app and we are wondering if there is a way where we can both edit the code at the same time?
Don't use SVN. You will see how easy version control could be and later everywhere on the job people will use Git because it is "better" and you will get frustrated.
Just use Git from the beginning, stay happy, you will love it. Really! 😏
The default in Xcode is Git too, so it can't be wrong.
Just be aware that the interface in Xcode is offering you a filtered version of the Git commands. As soon as you really need it for anything you will end up on the command line.
Whatever you try there, the first few times it will fail until you have learned the propper syntax and all side effects. So just make a copy of the folder, or zip or tar it before you try it a simple git command.
Also SourceTree is nice, but same problem there, learn what every command really does.
Use git! Lets people edit code and track the progress of the project (among many other useful tools).
Git Tutorial
If you are looking for more of a 'Google Docs' atmosphere, I would look into Codr or Cloud9
You can use SourceTree a free git repository handler.

Could not setup SVN in Xcode 5

I am not able to setup SVN in Xcode 5.
Iv tried these steps:
1) Goto-Xcode-Preferences-Accounts-Add Repositories (clicking "+" sign).
2) Enter the url to common server and click next.
3)Enter the credentials. At this point of time i get this error message
When i click ok i get this screen
Where do i go from here. No other Option left.
The source control seems to be like this.
Recommendation
I've answered a similar question here and provided references in my earlier answer. Generally speaking you should have been authenticated to the repository (if password is required) and then presented with a target directory. Please note that I am using Xcode 5.0.2 (5A3005).
You could also try importing a sample svn from an offline resource such as the one referenced in the image below. This would help you with validating that everything is correct on your machine/installation. At that point, I'd recommend extrapolating to see how your specific project might be different.
If all else fails you can go to Terminal and use the SVNBook resource from my other question to manually create a local SVN repository and then simply add that to your project. You could then work on adding a remote repo after you have the basics working.
My recommendation is use SVN via commands you can do this by download command online tools this is more reliable then GUI base tool.

Setting up TFS with FTP? [duplicate]

This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
How to connect TFS through Internet
I have a project I've been working on and I'd like to set up source control on it so my friend can join in and work on it with me. I've never done any kind of windows server administration so this is quite confusing for me.
We have a server that hosts our website, can I just create a directory on that server and host the project builds there? If so how can I set this up?
Am I supposed to install an instance of TFS on that server or can I just host the project builds in a directory on that server without installing anything on it?
I'm looking for a simple and secure way to work on the project with my friend. I've worked with TFS before so I know how to connect to the tfs server etc but how to set it up is beyond me. Can anyone advise me please in layman's terms how to make this setup, I'm a total server newb.
Thanks
TFS requires a dedicated server to use, it's not something you can (should) add to a production webserver, and it's a lot more involved than creating a folder for it to live in.
If you really need it to live on your webhost then look into something like GIT which I believe you may be able to do (http://stackoverflow.com/questions/51619/how-to-setup-git-bare-http-available-repository-on-iis-machine) - note i have no experience with this.
If you actually want TFS, then I recommend going with the TFSPreview.com and get Microsoft to host it for you. Advantages over git being you have an integrated work item respository and build server, if you want those features with Git you'd need to look into another piece of software (cruise control.net etc) which would also won't live happily on a webserver either so you'd need to get a server or online service anyway.

Getting past first base with TortoiseSVN

OK, I've been convinced that SVN is the way to go in a previous posting, but I haven't yet seen the epiphany. I'm not sure how I would set SubVersion up for my development environment.
Here's my current setup. I'm not keen to mess with it and it would be really nice if subversion could sit alongside it:
Work:
N:\Projects
N:\Projects\Lib
N:\Projects\App1
N:\Projects\App1\Help
N:\Projects\App1\Images
N:\Projects\App2
..etc
N: is on a separate server in the building.
There are several other development machines with the tools installed locally, but all development takes place referencing the files on the server - i.e. no source code is kept on the workstations.
Home
Laptop with same development toolset, and the sources in c:\Projects\App1.. etc, i.e. a mirror of the setup on n:\Projects at work.
The sources between N:\Projects and C:\Project are currently kept aligned with a custom app in conjunction with DropBox. File exclusions make sure that non-source files don't get sync'ed
I want to run SubVersion with this setup.
Where do I put the Repository?
Assuming I can have the repository in
a mutually accessible place, will SVN
remove the current need to sync
between work and home?
In order to embrace Subversion, you will replace your shared source directory with a Subversion repository that lives on the server. Each developer workstation will check out a copy of the whole source code locally (however, this could be a private area on a network server if you like).
You could retain your N:\Projects tree as a read-only copy of the daily build, or whatever. But one of the goals of Subversion is to mediate between two people editing the same file at roughly the same time. This is not compatible with a shared directory containing writable source code. Also, having multiple developers "share" the same Subversion working directory in some way is doomed to failure.
Why not create an internet accessible (free) trial Subversion account, and play around a bit, to get yourself familiar, before you move your entire source code tree into it. Just so you don't delete everything you own, by accident. Maybe start with one dummy project. Host something on the internet. Without even paying a cent, you could use this site:
http://www.projectlocker.com/
Then you can set up your very own starter subversion server. You can create a brand new Delphi application (file -> new delphi application), and add a button, and double click that button, and write a message box thingy, or whatever it is you like to do in demo apps. Now create a subversion repository (perhaps they call them projects, up on project locker), and add the folders you saved this project into, to that repository.
Now you can play with (a) tortoise SVN, (b) the SVN integration build into Rad Studio XE, if you have Rad Studio XE, and (c) the version control plugins that come in the JCL, if you don't have Rad Studio XE.
Also, may I suggest that if you want to have any hope of knowing what you're doing you learn how to add and commit, and update, from the command line. It's really not that hard. And it will pay off later.
Knowing you can type svn co http://reposite.something.com/svn/myproject to check out a project to your disk, is very handy. Sometimes, I think GUIs are training wheels for your brain. You cripple yourself if you don't learn command lines.
A benefit to a hosted subversion service like the one I showed above, is that you have an offsite backup. Of course, such hosting is always free even for large projects, if you are writing something open source. Then you can host on sourceforge. Otherwise, you're going to (a) need to use your own internet accessible host or (b) pay for hosting, otherwise you're not going to be able to easily access your repository at home, and at work.
Personally, if it was my own business, or my professional job to write software, I would host my own subversion server, and it would be private (LAN) only, and I would use a VPN to access it from home.
1: You definitely want a repository accessible from both locations. Either that, you you will need to use a distributed versioning system, like Mercurial or Git
2: Yes, there will be no more need for your custom sync app. This is exactly the job for your versioning system. Syncing manually in addition to using SVN is not necessary and would even create lots of conflicts.
Your shared directory should be removed and a copy of the code present on each machine that is a working copy of the SVN repository.
Use your server with the files to place the SVN server on it or any server that all including your home computer have access to.
Commit / Update every day, multiple time a day and manage merges if needed .
For the home access the simplest is to either get a dedicated server on the net or redirect the correct port on your router (but you will obviously need some access control in place) so that your repository is accessible from outside. If needed you could limit access from your home IP or from a list of IPs with a good router.
The other solution as other said is another kind of version system called "distributed" where every commit is done locally in your own repository on your own PC and this repository is merged on the "main" repository to share code and the change of other members of the team are pulled back in your local repository (You don't need any "main" repository technically on a DVCS but for a company that's what you will have).
See Git or Mercurial for good DVCS (Git syntax sucks but it's the most widely used system and technically the best one).
Put the repository in the safest place. That usually means a good redundant server (disks, etc.), in a controlled server room, and one which is properly backed up. When you switch to a VCS, source code to work on is typically in local machines sandboxes, because each developer must have its own. Then changes are get and sent to/from the server. Be aware that some tools may have issue is on a remote directory, because of the way for example the SMB protocol works - check they are supported explicitly if you need to use them. Unless you have paramount security needs, IMHO working in local sanboxes is faster and easier.
If you can access the SVN server from home (i.e. via a VPN), it will be not different than working from the office. You will "sync" (update/commit) your laptop sandbox the same way, you don't need a local server and repository. If you need a local server (reason could be you can't access the central repository from outside, need to work disconnected yet version files, etc.) there could be ways to replicate across SVN servers, but at that point maybe a distributed VCS should work better in such scenario.

What source control system? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I desperately need source control to manage projects between more than one developer.
A long time ago I used Visual Source Safe and it worked quite well.
What free substitutes can be recommended? I have the following basic requirements:
I need to host the repository on my own server.
I do not want extra clutter within my source files, like CVS does.
I need proper check in / check out, so that nobody can change a module until I've checked it back in.
I don't want / need source code merging / branching.
We use Delphi for web development, so many HTML files, images, SQL files, etc.
Any recommendations?
Git or Mercurial.
both are distributed and fast (each repository can act as 'server')
no extra clutter just one .git or .hg directory
you can pull changes from trusted or verified sources
I'll always recommend subversion with Visual SVN for server software and Tortoise SVN for the clients. You can exclusively check out files, so that nobody else can edit them, although that's not the default behavior. The only "clutter" it adds is a hidden .svn folder in every directory that is under version control.
If you insist on zero-clutter, and also free, you have limited choices. If you are open source, you can have a free copy of perforce. No clutter. SVN has clutter like CVS: a .something directory in each directory. git and hg just have one directory of clutter per clone.
If you absolutely insist on a checkout model, you have to give something up. P4 will do it, but none of the others will very well. Most people are more concerned these days with allowing disconnected operation than with a concept of locking. even svn lock only prevents checkin, not starting to modify.
There are other more obscure systems out there (e.g. arch) that you might look into.
I discourage the checkout/checkin approach. A decent version control system should be able to merge changes. This provides you with plenty of choices: CVS, SVN and Git.
As for "clutter" in your source files: I don't consider repository directories (e.g. .svn or .git) clutter, as this allows you to copy the repository structure.
Nevertheless, in SVN (not sure about Git) you can lock/unlock a file, basically mimicking the VSS checkout/checkin.
You should read a bit and learn a bit before you consign yourself and your fellow developers to living in the dark-ages of version control.
Visual Source Safe and the locking model of version control are dead. Most people have moved on. Those that have not are usually afraid of (or loathe) the idea of branching, and merging. Once they see that branching and merging can be easier, and more effective, then they can move onwards and upwards into a new world of version control options.
Ask yourself a few of these questions:
Would I like to separate the act of creating a new feature from the act of inflicting it on other developers, and on the final product (my live website)? If so, then I need branches. One branch = No effective version control.
Have I asked the other developers who will be working with me, what practices they find effective in multi-developer projects, and do they agree with me that locks are the way to go, or am I unilaterally enforcing my way of working with them? (You can have foo.pas for today, but try to get it checked in by 3 pm because I need to make a change to method bar inside foo.pas, later today.)
If I state that I want to make sure developers "avoid using old versions" do I have reasons for that other than that I hate or fear merging? Can we not think of any ways to prevent "using old versions"? Also, can we not think of any reasons when using old versions might be exactly what you have to do? If you used a non-locking tool like Subversion, why not say "please update before you commit". Then you will never have to merge, but if someone wishes to work with a non-changing version of the sources while developing the feature and then wishes to do the merging themselves, and you never have to merge yourself, you could insist that your work be done with locking (using subversion) but allow others the freedom to use a workflow that solves their problems, instead of yours.
Suppose (as you said in comments above) someone is removing something that you are in the act of creating. Wouldn't it be nice to see a complete list of his changes and say "I would like those changes gone, without removing other changes made by other people". This is known as working with "changesets" and is a key feature of DVCS like Mercurial (hg) and Git. In fact, the ability to prevent other people from modifying YOUR local repository willy-nilly, but rather making changes, which you can then review, and either accept or not accept will always be better at creating coherence on your (master) copy of the repository than any localized, centralized locking model can ever be.
W
You might like to investigate Team Coherence (http://www.teamcoherence.com). It doesn't create special folders and has a Delphi bent to it. For example, it groups .pas and .dfm files together by default. Help is excellent. It's also now free for a single license. I've been using it for years after previously using CVS and FreeVCS.
SourceGear's Vault is free for 1 user, and it gives you checkin/checkout plus merge-style operations. It also works totally clutter-free. I have been using it for some time and it works wonders. Transition from SourceSafe is especially easy, and integration with IDEs such as Visual Studio or Eclipse is very good.
Hmm, define "clutter" - to my mind a hidden directory per folder isn't clutter, frankly it hasn't been an issue at all (for reference, 7 years of first CVS then Subversion and prior to that VSS and something distributed the name of which eludes me).
Subversion is excellent and installation is almost trivial with VisualSVN server and use is straightforward with Tortoise as a client. Locking of files is an option, not a good one in the general instance but its there for binary files if you need it. This is probably the closest match to your criteria and I like it. A lot.
For personal use I'm playing with Mercurial - but not done enough to say more than that it works (and of course like most DVCS it fails your "lock" criteria). DVCS is different and has some issues.
If you have money, Vault (http://www.sourcegear.com) is worth a look - especially if you used and liked VSS since it started out as a "better" VSS though it has evolved somewhat. Worth visiting sourcegear just to read Erik Sink's thoughts on version control.
As for the rest, whilst I'm sympathetic to a wish not to (have to) merge stuff, writing off tagging and branching is pretty much the same as saying "I don't need version control" - it turns out not to be the case.
No one is recommending Bazaar, so here I am, I use it in my everyday work with Delphi projects.
It has a diff viewer that rocks, and that, for me at least, makes the difference with the other svn-like repositories.
I haven't used it for many years but I believe Jedi VCS meets all your criteria with the added bonus that it's written in Delphi and has some built-in smarts when it comes to handling dfm files.
We are using Fossil for source code managment of our Delphi programs.
It's very easy to use (if you like the KISS command line approach), and there is an internal web-based interface.
There is no installation needed, since it's only one executable to run. It's perfectly cross-platform: you can have your own repository on your Windows machine, then clone/synchronize it into any other server, running on Windows or Linux.
You can see our repository of Open Source Delphi programs hosted by Fossil on our web site. For internal work, I've found out that Fossil uses little bandwidth (much less than CVS or SVN), and is able to synchronize huge projects in a blitz, even via an ADSL or a 3G connection.
Here are some unique features, included in Fossil (with no third-party component to setup):
Bug Tracking And Wiki
Web Interface
Autosync
Self-Contained
Simple Networking - Fossil uses plain old HTTP
CGI Enabled - No server is required to use fossil.
Robust & Reliable
I would recommend Plastic SCM: http://www.plasticscm.com/
the best (?) merging and branching support!
but you can also use single branch + exclusive checkout (aka lock)
very nice and handy GUI
free up to 15 users
very good support (within a day, mostly within an hour!)
very modern, automatic merging and branching, distributed, etc
Delphi plugin available: http://code.google.com/p/plastic4delphi/

Resources