Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Is there some library or tool to allow a rails application to be configured using external files?
I want the database configuration (by default in config/database.yml) and the application configuration (configured in a environment specific file in config/environments/*.rb) to be in files (preferably yaml) not included in the project.
I know that this is not the standard way of doing things, but has some benefits:
The files can live in separate repository in version control
You can have different access control to this repository (you can hide the production configuration)
The config files can be deployed separately
You can change them manually on the machine, and they won't be overwritten when the application is re-deployed
You don't have to have a different rails environment for each deployment environment, but can have the changes made on that specific machine.
You could share configurations between applications
An even better solution would be to have partial external configuration - this way you can still have your basic configuration in the application, but overwrite parts of it.
It's is possible to do if you copy the external config files inside the application. This can be done in the beginning of config/application.rb before rails is loaded, but it looks like a hack, and hard to maintain. Is there some practical solution to allow this?
Dotenv is excellent and does exactly what you want. It's very common and a great way to keep secrets out of shared files. Combine it with env_bang-rails for some added goodness (defaults, failures if undefined, etc.)
https://github.com/bkeepers/dotenv
https://github.com/jcamenisch/ENV_BANG/
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I created a website (a Ruby on Rails application) that I would like to make open-source so that the community can make improvements. The source code is already publicly available on GitHub. However, I'd like to set up my server so that when I accept a pull request, the code is automatically deployed to production.
I doubt that I'm the first person to think of such a thing, so maybe a tool already exists to handle this. Currently I use Capistrano to deploy my application. Maybe there is a plugin available to add this sort of behavior. I also want to avoid publicizing the production API keys which currently only exist on the server.
If a tool/plugin does not already exist, what do I need to do in order to implement this type of behavior.
After some research, I wasn't able to find an open-source tool or tutorial on how to do this yourself. However, I came across some services which provide this functionality.
Travis CI
Travis CI is a continuous integration service which runs your test suite on every commit. They offer a "Continuous Deployment" feature which allows you to deploy on a successful build. When a GitHub pull request is merged into master, this triggers a Travis build and will deploy if all your tests pass. However, they have a limited list of hosting providers that they support.
http://docs.travis-ci.com/user/deployment/
Ninefold
Ninefold is a hosting provider and on the list Travis CI supported services. However, Ninefold has their own built-in support for automatic deployments which do not require you to use Travis. https://help.ninefold.com/hc/en-us/articles/200847214-How-to-deploy-an-app
I ended up migrating to Ninefold and using Travis CI to deploy.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have the same Xcode project, but in different stages. For some reasons source control was not used on it (by programmer before me).
They are from different forks and they went two separate ways. Some files have different changes.
I have a task to merge these into one codebase and resolve conflicts. There are many files that are common among codebases, I think around 80%.
What is the easiest/fastest way to find out which files have differences between versions so I could actually work on them?
I tried using diff tool and go one by one, but there are probably close to a thousand files there.
I use FileMerge for the same purposes. You can find it at XCode -> Open Developer Tool -> FileMerge.
There is intuitive interface. Just drag-n-drop folders to Left and Right panels and press Compare. It will show you list of files that differ. Double click on text files to see compariso
You can commit source files in the first project into a source version control system, like cvs or git, and then replace the source files with those in the second project. Then, you will be able to see the differences between two projects by using the built-in diff functions.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm looking for a document that explains the techniques to make the deployment of web applications: in the cloud, in-house, in housing ect ect ...
For every technique I would like to know the pros and cons, so I do a general idea.
I searched online but have not found anything really comprehensive and interesting.
Can you help me?
Apps
Web apps all have the same structure -- series of files running on a server "stack", accessed sequentially from middleware, or framework-based load structure
Your question, therefore, is more about which stack is going to be most scaleable, efficient, robust & expansive (can add extra resources). Here are the options:
Heroku
"Managed" cloud (environment already set up)
Runs off AWS instances
Versatile (runs any gem / app)
Owned by Salesforce
Lots of add-ons
Highly scalable
Not sure about price
Easy deployment (git push heroku master)
Cloud (AWS / Rackspace)
"Full" cloud
You're responsible for environment (OS, gems, ruby ver etc)
You're responsible for uptime
You have to maintain db etc yourself
Scaling can be a pain in the ass
Can deploy your app in a totally bespoke environment
Performance likely won't be issue (have 100's of servers to pool from)
VPS
"Shared" hosting
Have to install environment yourself
Very tricky to keep gems / ruby / rails up to date
Have to maintain the db etc yourself
Not many companies actually offer decent VPS
Costs more than Heroku
Not very scaleable
If someone else causes issues on the server, your app gets hit too
We use Heroku for all "baby" apps - AWS / Rackspace for apps with growth
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
how would you do to be able to change messages without having to stop the play instance?
You can't do that if your messages files are declared in common destination (and probably they are).
If you want to make it easier you need to put some additional work, for an example, you can use JavaScript for translating the labels, next you need to put these files OUTSIDE the public folder of the app, somewhere in the filesystem and access it with additional http server (otherwise it will require redeploying the app after each change).
off-topic:
In general I'm big advocate of serving static, public assets with frontend HTTP server instead of using the assets.at... method, thanks to this approach you are able to add/change/delete these assets without redeploying the application, and as we know images/scripts/styles are very often the subject to change. Finally you don't waste Play's resources for serving that stuff, and you are able to write advanced caching rulez with server's config (instead of 'fighting' with proper headers in Play's controllers)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have an MVC application in process of development and want to see if I can create or integrate it into an MVC-based CMS environment. The idea is that the application will appear to run in an environment wherein the user can actually add/edit web pages, download documents do blogs, handle Facebook integration etc.
In some respects I am almost looking for an Application Framework but that is not entirely the case. The application uses EF with an IRepository to allow switchable back-ends (including switching out EF). The key requirement is simply within the same solution to be able to provide a CMS type of management.
Architecturally I have thought of a side-by-side approach and also using a Module type approach wherein the app sits inside a CMS system.
In the immediate term does anyone have any comments, advise or experience as to how I could do this?
Take a look at the ASP.NET MVC based AtomSite. It may have the features you are looking for.
Well it looks like the answer finally came along with the Orchard Project which looks crisp and (reasonably) light-weight and provides a good MVC basis with Application Framework features for application development.