Rails 4 and Locomotive cms workarounds? - ruby-on-rails-3

I want to try Locomotive CMS, while I was installing it, I realised that only runs with rails 3+ version no 4.
As I am currently working in a couple of other apps in rails and I am pretty new to it, I was wondering if is there any way to run one version of rails for locomotive and another one(rails 4) for my other apps. If so how could it be done?
Thanks in advance.
C

You definetely want to start using rvm. It will help you not only separate your gems for different projects, but also separate and manage your Ruby versions. Definetely a great tool.

Related

Is it possible to deploy rails3 and rails4 in the same server?

I just want to know if is possible to deploy to passenger a project that I have in rails3 (ruby-1.9.3) and another project in rails4 (ruby-2.0.0). I have installed ruby using RVM on my production server, I'm just wondering if is going to be possible to have 2 different projects on the same production server.
Regards
No problem in that, but there're couple things that you need to do first.
Install nginx instead of Apache and use it with unicorn. You can find a whole lot of setup guides depending on your production server OS, or use the capistrano-nginx-unicorn gem if you use Capistrano for deployment.
Use the rvm-capistrano gem to manage the ruby versions and gemsets used in each project. It's pretty well documented, but if you have further questions, feel free to ask.
If you'll need any further help, you may also consider asking on the freenode#rvm channel. I found some great hints there.

Migrating from Rails 2.3 to 3.2 over a long period

I'm working on a small project that has been allocated a small amount of time to maintain and update features. This project is on Rails 2.3.
I'd like to move it to Rails 3.2 but there is little time allocated to this so I would like to do it over a slow gradual process.
I'm thinking that it might be worth moving over to Rails 3.2 on a section-by-section basis.
This would mean that I would create a second application that looks the same as the first one but is located somewhere different and accessed from a different subdomain.
Is this feasible if I just update the Rails 2.3 routes file for certain routes to go to the new application?
Has anyone done this before?
It depends on many parameters but among these the most relevant are :
Does your Rails 2 project already use Bundler ? If not, migrate to it before the migration.
Do you use gems which are known not to work on Rails 3 ?
Does your project already use Rails XSS plugin (https://github.com/rails/rails_xss) ? If not, migrate to it before the migration.
After that, the migration will be easier.
For the migration, I recommend that you create a brand new Rails application using "rails new" command, so that all the boot files will be good. Then migrate the initializers/config files and "app" folder...
Good luck.

Upgrade Rails 2.3.14 to Rails 3.1.0, or re-write app fresh in Rails 3.1.0

I have upgraded my app to Rails 3.1.0, and while I have solved many compatibility issues, but I have also noticed that there are many redundant files, junk codes, and some features I have to recode again.
I am just wondering if I should just rewrite my app from fresh in Rails 3.1.0, or continue modifying and fixing after the upgrade? The former one will produce a cleaner app, but more work, and the latter one will be faster, but will also take some time to clean up the mess. What is my best approach?
Thanks.
what I do is create a fresh empty rails 3.1 app. Install my gems with bundler. Then I copy over my migrations, my models and my spec tests. Run my tests. Get tests passing, resolve any incompatibility issues. Repeat with config/routes, controllers, views, etc.

What continuous integration servers work well with ruby on rails 3 and mac?

I am using a mac as the server. I need something that works well.
I wanted to use atlassian's bamboo but my attempts have failed. The latest doc I can find on the topic is an old blog post. http://blogs.atlassian.com/news/2009/05/bamboo_customer_8.html which helps very little and results in the error:
...rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems.rb:900:in `report_activate_error': Could not find RubyGem bundler (>= 0) (Gem::LoadError)
I looked at http://rubyforge.org/frs/?group_id=2918 which also appears to be years out of date.
So the question is, which Continuous integration server should I use for my rails 3 project, which I can run on a mac and use .rvm (today in 2011)?
Jenkins is always worked for me, you even have a OSX installer:
http://ingorichter.blogspot.com/2011/04/jenkins-osx-installer.html
CI Joe works fine for me with rails 3 and mac.
Jenkins also seems nice, though, as Ed_ mentioned. Especially the part about the OSX installer.
CruiseControl.rb is a CI written in Ruby and can be used for Rails projects.

Is there any working CMS extension for Spree 0.40.x (Rails 3)?

I've been trying to add a basic CMS to my new Spree 0.40.x but I'm no getting any success. Documentation seems bare empty.
I've tried every extension listed here but I couldn't install some of them, others I did installed them, but seems they're using rails 2 deprecated methods.
Does any of you have been able to add a CMS to Spree under Rails 3? I don't mind if i need to use an older version of Spree, I just need a basic CMS.
Thank you
Why exactly will you need CMS?
If you require it to create static pages with WYSWYG editor then you can use spree-static-content extension https://github.com/spree/spree_static_content