Simple CI for Rails [closed] - ruby-on-rails

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm looking for a continuous integration server that:
Allows me to simply add my clients Rails projects as builds, checking out from Github on a new commit. These are NOT public projects.
Allows me to notify results into a campfire room.
Allows me to install services that I might need such as Postgres or Redis, so probably not anything that's hosted and run by someone else.
Is easily hosted
Are there any solutions out there that are suited to this? I've looked at Hudson and Teamcity, but was wondering what else there was out there.

Well, as long as we're spamming our own products, why don't I add mine :)
CircleCI does everything you said and more.
Security, all your databases, github, heroku and campfire+hipchat integration, automatic parallelism, incredibly fast builds, and can be set up in moments.
If you're interested in some of the rationale, check out the StackOverflow podcast where Joel and I talk about it :)

Checkout TestPilot CI
It supports private repos in a high security sandbox environment, automatically connects to Github to trigger builds when code changes, notifies by Campfire or email, and has an open source build environment (which already includes the most common dependencies, like Redis, Mongo, Postgres, Riak, Mysql, Sqlite3, RabbitMQ etc.)
I'm one of the developers behind it and we are constantly developing new features based on customer demand, so we'd love to hear what you think of it.

Take a look at Travis CI

You should definitely check out Tddium. Sign up for a free 14-day trial: there's no need to wait for a beta invitation.
It's fully hosted in sandboxed VM's, supports private Git repositories, and does CI through git hooks. Campfire integration is included.
Tddium currently supports:
Full Heroku integration, including a Heroku-approved addon
RSpec, Cucumber, Spinach, Test::Unit, and Jasmine (via Webkit)
MySQL, Postgres, Mongo
Redis, Memcached, Riak
Solr and ThinkingSphinx
Capybara, Selenium, WebKit, Culerity
Ruby 1.9.3, 1.9.2, 1.8.7, and REE
CouchDB and RabbitMQ

Related

grails cloud-hosting recommendation [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm looking for cloud-hosting for a Grails app. In the past, I've tried several including CloudFoundry, JElastic, AppFog, but could never successfully deploy the app. The app needs:
MySQL database
File system access in order to store the Searchable plugin index files and images uploaded by users
I'll only be using this site for QA, so am not concerned about performance. Obviously I'd like it to be as simple as possible to deploy the app, and I'd like to pay as little as possible for the hosting.
I've already tried using the CloudFoundry Grails plugin to deploy to CloudFoundry, but without any success.
I have successfully hosted Grails based websites on Amazon EC2. To reduce the cost, I used small reserved instance. I think It's ok to use Amazon EC2 AMI for temporary files such as searchable index files since you can always re-index if AMI crashes.
To store user images, I used Amazon S3 using Grails AWS SDK plugin (http://grails.org/plugin/aws-sdk). It is very easy to upload files to S3 using Amazon SDK http://blanq.github.io/grails-aws/1.2.12.1/index.html -
To Upload a file with public read permissions.
amazonWebService.s3.putObject(new PutObjectRequest('some-grails-bucket',
'somePath/someKey.jpg', new File('/Users/ben/Desktop/photo.jpg')).withCannedAcl( CannedAccessControlList.PublicRead ) )
Download a file.
amazonWebService.s3.getObject(new GetObjectRequest('some-grails-bucket',
'somePath/someKey.jpg'), new File('/Users/ben/Downloads/photo.jpg'))
Delete a file.
amazonWebService.s3.deleteObject('some-grails-bucket', 'somePath/someKey.jpg')
I hope this helps.
I know it's not an ideal solution, but you could use mongodb's gridfs to store your files rather than the file system. Cloudfoundry supports mongodb, as I'm sure you know.
This doesn't help with your searchable plugin index though.

Experienced web developers, what's the learning curve like on heroku? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I just began switching from spring development to ruby on rails. I wanted to know from those who have used it before, what's the learning curve, if any, on a rails application being deployed for heroku?
Are there any special needs for heroku deployment?
What are the major advantages and disadvantages of heroku?
Thanks in advance :D
Heroku is the easiest possible Rails deployment. It's a fully managed black-box solution for your app with excellent documentation, and they are consistently improving it with an eye to usability. Once you have a working development version of your app, it's a very short hop to being up and running on Heroku. See the Quickstart and Getting Started with Ruby articles for the specifics.
The cost of this ease-of-use is a certain amount of inflexibility. They do a good job of making things open-ended, but a one-size-fits-all approach to hosting architecture inevitably will lead to issues. If you just have a small to medium web app with a standard relational database and common load profile this is not much of a problem. If you need a more custom stack with various additional services (eg. redis, sphinx, rabbitmq, etc) then you'll likely be getting into third-party addons. All of these hosted solutions and Heroku itself charge a premium over the Amazon Web Services that they are built on, which in turn charges a premium over raw hardware / colocation costs of running your own servers. If your site scales very large not only will you be paying a huge premium, but the assumptions that hosted service providers make for the general case will inevitably not fit your particular case as well as a custom-tuned cluster. This is why all truly massive companies like Google, Facebook, Yahoo all run their own data centers, because at that scale having a cadre of dedicated $200k/year systems engineers designing and maintaining your infrastructure pays for itself for many times over simply from the savings of moving away from commodity solutions.
But at small scale, especially during the early rapid iteration of a product, using something like Heroku means you can focus entirely on your application and have a minimum of worry about infrastructure. One exception is if you have a lot of Linux sysadmin chops, then Heroku may not be worth the cost even early, and in that case you might be more comfortable with something like Engine Yard that still provides you with a full Rails stack out of the box, but keeps you closer to the metal.
In any case though, Heroku is a great place to start for a Rails beginner. It's free to get started, and there's no reason you can't do a cost assessment and migrate away later when you have more experience.
The answer by gtd is great, just to add a bit about the problems I have ran into with heroku:
When I started with Ruby on Rails and Heroku about a year ago, the thing that gave me most problems was that by default on my dev machine, Rails used SQLite, and on Heroku the default is postgreSQL.
It usually doesn't give much trouble but certain things such as GROUP BY work differently which led me to lots of frustration when certain things would work on my dev machine and not on Heroku. I would suggest you install a postgreSQL server on your dev machine, for non trivial apps that you are planning to deploy on Heroku.
There are a couple other things that you can't do on Heroku and you can on a VPS, I had problems when working with a payment provider which required me to have a static ip, because Heroku is a cloud service it couldn't be done, and I had to use a proxy to connect with the provider.
Also there are a couple of gems (very few) which you can't install there, and you can't install binaries which some gems depend on, although it's never been a problem for me, bear that in mind.
Other than that couple of gotchas, Heroku is the easiest place to start deploying your apps.

AirBrake vs Exceptional vs errbit: which one is the best to track exceptions in your rails app? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
It's important to collect and manage exceptions in your web application since it's unfortunately unavoidable. I used to use Exception Notifier but eventually I ended up using web-based service/tool for that purpose. AirBrake(formerly known as Hoptoad) is great but they got acquired by Exceptional so they might shut down one of the two services(they haven't officially announced anything about shutting down though).
There are also several open source projects for exception managing.
Here is a list of services/tools for tracking exceptions.
AirBrake: great exception managing service that has been acquired by Exceptional.
Exceptional: another exception managing service that costs $9/month.
errbit: open source error catcher that's Airbrake API compliant.
Now you will come up with an interesting question: What service/tool should I use?
If I choose AirBrake/Exceptional I should care about their intention and consider moving collected data if shutting down really happens. errbit needs to be deployed somewhere and we should manage the deployed errbit itself. New Relic and Amon can track them but these two are not as functional as the others. In this case, which one do you choose?
There is also this kind of services for other platforms(eg: bugsense for mobile platforms). But in this question just focus on rails apps.
Disclaimer. I'm the lead Product guy at Airbrake / Exceptional.
We agree that it's important to track / manage exceptions in your app; both products have been doing so successfully since 2008. Both teams built an excellent services. Unfortunately there hasn't been much product innovation in the last few years. Our team is dedicated to building a strong business exception tracking business that provides the best tools for developers. We have lots of innovation coming; longer datastore, graphs, search, analytics, reports, improved UI etc.. We plan to be around for a long time.
Regarding your concerns.
Service closing down. We are stabling out both products, we've updated both API and backend datastores to fix legacy scaling issue. We are currently updating both apps, and won't be shutting any service down. We are still to publish our long-term roadmap, but we will offer a way to export or take the data with you if we were to ever shut one down.
Addressing your question. "Which service should you use? (For Rails) - It depends. I would recommend trying out both services, as both have different UI features, both services a free 30 day trial. The gem is different for both apps, and I would recommend reading the respective readmes. Exceptional Gem on Github and Airbrake Gem on Github.
I'm not going to address non-rails questions here, but I'm happy to follow up on any other question. You can reach me at ben#airbrake.io or ben#exceptional.io ;-)

Online SDK / IDE for Open-Source Projects [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Is there any online, editable, code base that can also compile the code?
This is more of an "I wish" than a question, since I've tried to find one with no success. It seems to me that there are a number of open-source, very popular systems which could be integrated for a great benefit to the open-source community.
An online collaborative tool, basically a wiki. Needs to have some versioning.
An IDE/SDK type tool - at a minimum just a syntax checker and compiler
If these two are combined, you would have an open source project that anyone contribute to. The way I see it working is like this:
Every wiki page is a single class
To update a class you must pass a syntax check, including not breaking any other classes that depend on this class
There are two kinds of users - administrators and contributors (who can be anonymous).
Administrators have to approve updates to classes before they can be included in a compile-able release. They also rate the changes that they "approve", which is a sort-of ranking system for the contributors. If security is a concern, you could say that every approved change is randomly assigned to another admin for approval, and if that person detects malicious code then the first approver is now suspect and may be removed from being an admin.
Contributors can download any approved release, and can optionally download a version that includes all of their own revisions that have not been approved yet. This is normally for their own testing, but maybe they just want to change a behavior, even if no one else likes that change.
Any class (that meets certain requirements) can be marked as a "root" class, which means it can be compiled with its dependencies.
The advantages with this system seem huge to me!
Participation with almost no effort. The work of joining an open-source project is normally at a minimum an hour or more. That is in addition to initially downloading and installing a compatible SDK tool.
Learning about open-source with much reduced effort. I see many more people joining in with a friendly, wikipedia style site that they can just browse through as a way of learning the code base
Better code base (refactoring) All those people who tweak wikipedia will be free to tweak source code too. Cleaner code will in turn be easier to read and maintain.
Easy customization If I want to add a feature to my favorite open-source software, I can just make a change and download the compiled version. No need to
This could be a build process for web servers. Plug this into updating a web-site, and it can replace your current build server. When a version is approved, it just deploys the update (presumably on a schedule so it is during low-usage hours)
I see a few down-sides, the same as those that already exist in wiki sites and open-source projects, somewhat amplified. But I think these all have somewhat standard
Public/anonymous contributions could be bad or malicious
Blocking "spam" contributions
Bandwidth of downloads (all those executable files)
CPU to compile all the versions
Does any such thing exists? If not, how feasible would it be for a team to put this together? Are there any other major problems that could kill this idea?
This idea just occurred to me one day, and I can't find it. I'm putting this "out there" partially to "establish prior art". This idea is free to be taken and used, just not free to be patented :p.
Perhaps you're looking for Cloud9 IDE?
From their website:
Cloud9 IDE is an online development environment for Javascript and Node.js applications as well as HTML, CSS, PHP, Java, Ruby and 23 other languages... Teams can collaborate on projects and run them within the browser. When you're finished, deploy it—and you're done!

Rails + Oracle: worth hassle? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Is it architecturally sound to use Rails and Oracle?
My concern is that Oracle would be too "heavy and hi-end" for Rails.
Any thoughts?
Thanks.
The database needs of Rails more or less boil down to tables, indices and CRUD.
Anything that provides those ought to be able to serve as the back-end to a Rails app, and Oracle certainly does those parts somewhere among the bloat vast range of features it provides. If you can use ActiveRecord migrations then you shouldn't need to worry too much about platform-specific aspects anyway.
The oracle-adapter for ActiveRecord (which needs to be downloaded separately and placed in activerecord\lib\active_record\connection_adapters, btw) makes use of Oracle-specific elements where appropriate, the main one I can think of being the use of sequences for id generation.
The Oracle query optimiser is very smart, probably rather better for complex multi-table queries than, say, MySQL.
If you're looking at Oracle as a back-end for an externally-hosted site, then I'd be sceptical on cost grounds, as well as the reservation already stated about availability. But I suspect that the question relates more to what's already available in-house, in which case I'd say it's about as "good" a solution as you can get.
I'm developing intranet applications on Rails/Oracle, using OracleXE locally for development, deploying to some "big iron" machine (it's someone else's job to care for it, I don't even know what OS it's running) for production.
EDIT: It's worth looking at the activerecord-oracle_enhanced-adapter (it's a gem) as a replacement for the built-in oracle adapter, if only for the improved handling of date/datetime values (Oracle only has one column type for both: DATE). It's probably saved me from a breakdown...
Why too heavy? Oracle it's just a database that can be simple to heavy depending on your use. Today Oracle have a lot of editions to accomodate any use, for instance the little one Oracle XE.
If your are happy with Oracle, use it. Don't worry.
The problem that you may suffer when using Oracle as Database is you can't find many hosting companies offering oracle as choice for your database on web.
also oracle like a giant DB, if you don't need the specific features in it, why use it?
Another thing to consider regarding Oracle and Rails: none of the full text searching plug-ins for Rails support Oracle at this time. Indeed, pretty much only MySQL and PostgreSQL are well-supported by the various full-text options.
This is not to say you won't be able to do full-text searching if you use Oracle, just that you will not be able to use any of the existing plug-ins that make doing so simple.
I'm currently using Oracle with some Rails applications. There are both standard ActiveRecord and JDBC-ActiveRecord adapters (I'm hosting some apps with JRuby) and for the most part, things work great.
I would suggest using the enhanced ActiveRecord Oracle adapter though.
http://rubyforge.org/projects/oracle-enhanced/
But if you're not locked into Oracle, go with Postgres or MySQL.

Resources