Ruby 1.9.3 or latest stable build (2.3.x)? - ruby-on-rails

I'm about to install ruby for an application I am developing is there a particular reason I should do the latest stable build or is 1.9.3 going to be fine for my application? (it's a simple Rails app that will call a mongoDB with some queries visualize data, download it do some analysis) What are the primary advantages to using 1.9.3 over the latest build?

Simply for safety reasons, support and updates I would decide to use the newest stable release for a new project. That's my opinion and suggestion.

Related

Cloud9 Warning do I just ignore?

During testing in chapter 3 I get the following warning, is this ok to ignore?
RubyDep: WARNING: your Ruby is outdated/buggy. Please upgrade. (To disable >warnings, set RUBY_DEP_GEM_SILENCE_WARNINGS=1)
Run options: --seed 18589
I'd say yes, it's okay.
...for as long as you're following a tutorial that was staged on specific versions of Ruby, Rails and other libraries. What's told in the tutorial was likely tested on these and works even despite the software being "outdated/buggy".
Depending on how ready you are to resolve sudden issues and deal with changes as the result of upgrading anything...
You can either go for using latest versions now and expect the outcomes to diverge from what's given in the tutorial...
...or strictly follow the tutorial and use outdated versions until the tutorial is complete and there are no more directions and expectations.
In contrast to above answers I'd suggest you to update the Ruby to latest version because I had same error when I revisited sample app and without updating I was not able to run tests. So just follow these simple steps and update Ruby to latest version:
As stated by Mo H., install RVM first.
and the upgrade it to 2.3.1.
Also after upgrading, make sure to check the ruby version using ruby -v and if it still shows ruby-2.3.0 then run
rvm use default ruby-2.3.1
This is really dependent on what version of ruby you are running. In general it might be fine to ignore it, but if I were you I wouldn't risk it. Your best bet is to install RVM. This will allow you switch between ruby versions, so you can swap to a newer version of ruby and make sure everything works as it should and see if the warning goes away.
Warnings are there for a reason, and while you can ignore them, it can come back to haunt you later. When its something simple like this its better to just deal with it.

Grails upgrade from 2.2.3 to 2.5.1

The project I've been working on needs to upgrade it's grails version from 2.2.3 to 2.5.1. Needless to say, the project is huge and I am sure there will be lots of issues while upgrading.
What are the precautions needed while upgrading? And what are the changes required in the dependencies below:
dependencies {
runtime 'mysql:mysql-connector-java:5.1.34'
compile ('ar.com.fdvs:DynamicJasper:5.0.0')
compile ('org.apache.poi:poi:3.10-FINAL')
compile ("com.aspose:aspose-words:14.5.0")
compile ("com.aspose:aspose-cells:8.4.2")
}
As well as in plugins below:
plugins {
compile ":aws-sdk:1.6.7"
compile ":export:1.5"
}
You can find the high level changes listed for each major release up to 2.5.0 in the 2.5.1 documentation.
You will need to note all of the features which will change during the upgrade, identify where you are using them and plan how you are going to migrate.
What I usually do when upgrading the Grails version (apart from reading the upgrade sections of the version I'm upgrading to and all in between major versions) is create a new empty application with the new Grails.
And then use a tree compare tool (like meld) and compare all the build and configuration files to see what has changed.
This way you get most of the needed changes without much trouble. You still need to test your application thoroughly. Hopefully you have lots of unit and integration tests to help you with that...

Using ES6 on Electron app with io.js

I am writing cross-platform application with electron.
I want to be enable ES6 arrow-function feature in main process using like iojs --harmony_arrow_functions.
Electron already installed successfully on io.js 3.1.0 .
How I can do it with io.js?
If you go to the electron releases, in major/minor release notes you can see which version of nodejs it is using:
https://github.com/atom/electron/releases/tag/v0.36.0
Upgrade to Node 5.1.1.
I'm not totally sure which version of node arrow functions first became available but I can confirm that they are available in the latest version, 5.2.0.
Relatedly, to easily switch between versions of node I highly recommend using nvm:
https://github.com/creationix/nvm
That way you can easily switch to match updated versions of electron and you can automate it quite easily as well.
Electron was switched to nodejs, currently 5.1 see here - https://github.com/atom/electron/releases/tag/v0.36.0

Upgrading Cordova 1.9 to 2.0 version

I need to upgrade my application which is using Cordova 1.8 version to Cordova 2.0 version. I followed the steps mentioned in the http://cordova.apache.org/docs/en/2.8.0/guide_upgrading_ios_index.md.html. My application's running for 1.9 but when am trying to upgrade it to 2.0 version am not able to find 'Preprocessor Macro' in build setting.
Also I am not able to find 'CordovaLib' folder, but in the 10th step they have mentioned related to PreprocessorMacro which am not able to find.
As you main motivation seems to be up to date with the last version of Cordova, I would recommend to create a new clean project with Cordova 2.8 and import your html files in the www folder.
Upgrading version by version is painful and you will not get any benefits from it. However, you might not get any performance improvement but you will get a better support from the community.

Upgrade Phonegap for iOS (from 1.4.1 to latest)

I would like to know if anyone has experience in upgrading phonegap. Would like to get some help.
I have an iOS Phonegap-based project that uses phonegap 1.4.1.
I need to update it to the latest version. The latest version is currently 2.2.0
The steps that described in the phone gap document only tells us how to upgrade from one version to the other, but it doesn't help me in upgrade phone gap from a very old version to the latest one.
http://docs.phonegap.com/en/2.2.0/guide_upgrading_ios_index.md.html#Upgrading%20Cordova%20iOS
I can see three BIG changes from 1.4.1 to the latest version.
From 1.4.1 to 1.5.0, PhoneGap.framework has been renamed to Cordova.framework
From 1.9.0 to 2.0.0, Cordova.framework has been removed, instead it uses CordovaLib as a sub-project.
From 2.0.0 to 2.1.0, Automatic Reference Counting (ARC) is introduced to CordovaLib
I am not sure what is the best approach for me to upgrade my old phonegap, I don't feel confident to jump straight from 1.4.1 to 2.2.0, by given the fact that there is no documents/tutorials to follow.
I am thinking to upgrade the phonegap from 1.4.1 to 1.9 first, and then upgrade 1.9.0 to 2.0.0 and to 2.2.0. But it seems a big job.
Please give me some suggestion on it, or is there anyone come across this?
Thanks in advance.
My recommendation is:
Create a totally new project.
Copy your www assets into the new www
Refer to the new cordova .js file in your index.html
Re-add your Plugins (make sure the plugins support the new Cordova version)
Update your Cordova.plist settings to reflect what you want, see the Project Settings on http://docs.cordova.io
Update your whitelist, see the Whitelist Guide on http://docs.cordova.io
It's really depends on how much your app hooks into the phonegap's "native" calls,..
If it's mostly your own codes, I'd just start a new project and copy the html folder over, find and replace the mentions phonegap.js to cordova.js. Chances are, the app will work, if it doesn't, it should be a minor fix.
Or check out https://build.phonegap.com/ - phonegap's cloud base builder.

Resources