I have a rails 3 app, and I want to use a plugin that requires rails_generator, which is no longer available in rails 3. Can I have the plugin run with Rails 2, and my app run with Rails 3?
EDIT:
I asked on IRC (#rubyonrails) and the answer is no :(
Rails 3 has a generator. Depending on the rest of the plugin though you might have to make modifications to make it Rails 3 compatible. You can run the generator like this:
rails generate ...
Related
How should i update my existing app from rails 4.0 to rails 4.1 . i know i have to update the gem . Is there also any other configuration to modify in the app.
This is how I'm doing it:
See that you have a sufficient test suite and that all tests pass
Review your Gemfile. What needs to be updated to be Rails 4.1 compatible?
Update them now; see that your test suite still passes
Use railsdiff.org to see the basic changes to a new rails app and apply them accordingly
http://railsdiff.org/diff/v4.0.3/v4.1.8/
Follow the official Rails guide for upgrading to Rails 4.1
http://guides.rubyonrails.org/4_1_release_notes.html
Google for more guides on upgrading to Rails 4.1
https://www.google.com/search?q=upgrade+to+rails+4.1
They mention some more things you have to take care of when upgrading to Rails 4.1.
Especially mentioning some non-default gems, like Rspec etc.
Run your test suite, see that all tests pass. Update or fix your code if necessary.
Take a look at the Ruby on Rails guide for upgrading. It depends on how your app is built already.
Has anyone tried JasminRice gem with Rails 4?
I've got Ember Rails 4 app and I would like to use Jasmine Rice but I'm not sure whether it would work out well as their Github account says Pain free coffeescript testing under Rails 3.1
Jasmine Rice
I would advice you to use jasmine-gem, which recently gained Rails 4 support. jasmine-gem is developed by Pivotal, the company that develops Jasmine itself, and is actively maintained. While this gem was very basic for a long time, it has improved tremendously, especially with version 2.0.0. Spec execution in Phantomjs (in addition to the browser, which is the fastest for development) is supported, and there is full integration into the Asset Pipeline, which lets you e.g. write tests in CoffeeScript. At my student job, we are using jasmine-gem extensively and are very happy with it.
In the jasminerice installation section they mention that it should work on rails 4:
This gem has been tested and run with Rails 3.1 and 3.2. It should
also run on Rails 4.
"Should" is not as strong of a word as I would like, but I have a ember rails 4 app and jaminerice has not given me any issues.
I recently learned Rails (Rails 3 to be specific) and got a small project maintaining a Rails 2.3.2 app.
So, as you might expect, I keep running into differences between what I learned in Rails 3 and what I'm working in.
For example 'rails server' command in Rails 3 is 'script/server' in Rails 2.x.
What else should I know to maintain my sanity?
If you're new to rails, I don't know if you'll see a lot of differences. The rails server command is one thing however.
The other big thing is the use of .gemspec in Rails 2.3.5 instead of Bundler and Gemfiles in Rails 3. Installing gems/specifying which gems your app uses is way better in Rails 3 I think.
The rest are mostly syntax changes and depreciated functions in specific areas (e.g. javascript generators).
This Blog does a good job of listing most of the major changes in more detail.
Hope that helps!
Im considering upgrading a rails 2 app to rails 3 for a number of reasons (rails 3 features, certain plugins require rails 3 etc.)
Obviously ill have to update/grade some of the plugins as well. But concerning the code itself, should there be any compatibility issues when upgrading to 3? I know rails 3 changes a lot of helpers and syntax to make things easier, but do the older and more complicated ways still work (ex. gems in envioronment.rb, not Gemfile).
Also, anyone know a good tutorial on how to do it?
I have written a blogpost about it, where I point to the standard resources, but also handle some more deeper problems I encountered.
Hope this helps.
You may try this plugin to check your application compatibility in Rails 3. https://github.com/rails/rails_upgrade
If you want to upgrade from Rails 2 to Rails 3, first make sure to upgrade to the latest 2.3 version.
Then, before migrating, there is a list of changes you can make to make your Rails 2.3 application behaving like a Rails 3 application. Once you applied these changes, chances are the number of issues will be smaller and you can upgrade to Rails 3.
Once you installed Rails 3, use the rails_upgrade plugin to check the incompatibilities and fix them.
I have created a project using rails 2.3.8.. Now i need to move rails 3.x.x ..so how can i upgrade my project also?
please tell some tutorial or link to upgrade this?
Start by using the rails upgrade gem. There are several tutorials out on the web that can walk you through what you need to do.
Most importantly, TEST your app thoroughly after doing so.