Why are development style sheets and devise logout not working? - ruby-on-rails-3

I have a 3.2.8 Rails application which has been deployed into production and is running just fine. While preparing to code an enhancement I pulled fresh code from the SVN and started up a development version of the application and found the stylesheets were non functional and the Devise logout did not work in DEVELOPMENT.
All other aspects of the application work exactly as they should.
I've been reading many stack over flow Q & A and cannot figure this out.

Then I realized the default version of Ruby did not match the version for the application.
The application was built with ruby 1.9.3 p286 and my machine boots up in Ruby 2.1.0
solution:
stop the server
rvm use ruby-1.9.3-p286
bundle install
rails server
= good to go.

Related

Newrelic rpm does not work with Rails 5 + Rocketpant

I recently upgrade my Rails app from 4.2.5 to 5.0.2
Everything works fine except Newrelic RPM to track our API performance.
On Rails 4.2.5, we are using a folk of the gem 'rocket_pants-rpm' to make Newrelic track Rocketpants API endpoint correctly.
https://github.com/Sutto/rocket_pants-rpm/pull/3/files
But after upgrading to 5.0.2, this fork does not work anymore.
I am not very familiar with how the Newrelic agent works, any idea to make Newrelic work with Rails 5 + Rocketpants again?
I fix the issue myself. It turns out the gem rocket_pants-rpm doesn't load Newrelic agent since it does NOT check Rails major version 5.
I have submitted a pull request
https://github.com/Sutto/rocket_pants-rpm/pull/4
Which solves this issue, now Newrelic shows my API endpoints under namespace Api::V1 again : )

Why won't my new Ruby on Rails site start in development?

I'm using user-per-app configuration on an Ubuntu server running ruby 1.9.3 and rails 3.2.8.
When I create a new site using rails new test_app in the home directory of one user (my main user) and then run rails s from the app directory I get
Rails 3.2.8 application starting in development on http://0.0.0.0:3000
but when I su to another user and run the same commands in the home directory of that user, I get
Rails 3.2.8 application starting in production on http://0.0.0.0:3000
and the same thing even if I run
rails s -e development
No matter what I do as the other user, I cannot get WEBrick to start in development. What's going on here?
This must be my day to post Stack Exchange questions and then find the answer myself within moments.
Obviously there was something different about these two users and I just could not figure out what it was. The difference between users ended up being that as the failing user I was playing around with #wayne-e-seguin 's SM framework. The default installation of this sets the environment and RAILS_ENV to production. Setting those to "development" in ~/.smrc did the trick.

Running rails 3.0 project on rails 3.1 machine

I have installed rails 3.1 on my system but currently I have to work on rails 3.0 project. How can I run it. Otherwise it suggests me to use bundle exec for every command.
Secondly, it is showing me the following error :-
Command 'exiftool' not found.
How to get rid of these errors. Please guide.
Thanx.
Command 'exiftool' not found.
Upgrading to Rails 3.1 (screencast, first few minutes if you don't need Asset Pipeline)
Consider using RVM. With this thingumajig you can have different gemset (including rails, rusty and shiny) and even ruby version for each of your applications. Start from here.

Issues with Rails3.0 vs Rails 3.1

So I finally upgraded (and then downgraded because of Unity) Ubuntu and reinstalled RVM but I'b stuck with rails 3.1 now, which is fine but all my old projects are in rails 3.0 and 3.1 has some incompatibilities. Off the top of my head RAILS_ROOT is now Rails.root (which all my projects use in someway), and I was having some issues with heroku when trying to upload a small rails 3.1 app I made to play around (since the PG gem wasnt in my gemlist I couldnt run migrations, and then installing the pg gem caused more issues).
So how do I install rails 3.0 again? I cant seem to find it in the repositories
And I know with gem sets I can install both right? Well if I do that, how do I create a new rails project? Which version of rails would use rails new new_app?
Ok, I understand what you need to do. I would highly recommend making a new Gemset using RVM, that way you can start from scratch and not worry about those things.
To do that, run this in your command line with RVM installed:
// EDIT THIS LINE TO MATCH WHAT YOU WANT
rvm use 1.9.2-or-which-ever-version-you-are-using#temporary_gemset --create
Once this gemset is created, it will be empty, so you can then proceed to install a younger version of rails, like so:
gem install rails -v 3.0.11 // (MAY NEED TO USE SUDO, DEPENDING ON YOUR SET UP)
This should install the older version of rails and its dependencies so that you can still edit and work with your older rails project. Check more of RVM's site for more help on switching between gemsets and creating them.
https://rvm.io//gemsets/
I would still recommend to figure out the differences eventually and move to the newer version for Rails, currently 3.2.5 because they are awesome. Here is some material to show you the differences and new features for when you do that later:
http://railscasts.com/episodes/265-rails-3-1-overview
http://railscasts.com/episodes/282-upgrading-to-rails-3-1
http://railscasts.com/episodes/318-upgrading-to-rails-3-2

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.