Rails: Installing Twitter-Bootstrap 3 in a Rails project - ruby-on-rails-3

I am a total n00b and am trying to install Twitter-Bootstrap 3 into my rails project. The twitter-bootstrap-rails gem is unfortunately only for version 2.0, otherwise I would totally use that. Is there some kind of set up magic I need to do in my app to configure it with my Rails project other than copy and paste the Bootstrap directories into my rails project repo?
Any and all advice much appreciated!

Related

Rails not found in specific rails project folder

I've installed rails using rvm. I've loaded rvm using ~/.bahsrc.
rails is working fine.
which rails
/home/user/.rvm/gems/ruby-2.1.0/bin/rails
but in that rails project folder which command says
/home/dinesh/.rvm/gems/ruby-2.0.0-p353#something/bin/rails
How's this happening? How to make my rails work in that folder?
If you are in the root of a rails project you may use
./script/rails --version # (or whatever rails command you want to call)
to be sure to use the rails version that corresponds to your project. Usually rails magic will apply inside a rails project and "happen" to find the correct version of rails, but there seems to be a number of things that can go wrong about that.

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

problem in installation on acts_as_taggable_on_steroids as a gem

hi i am trying to use acts_as_taggable_on_steroids in my rails3 project, but it gives me error.Once i installed it as plugin but no improvement.
please give me steps to install it as gem in rails3 ,and it's usage.
You have to use it as a plugin to work, at least that way worked for me in Rails 3. Download the plugin and put in in /vendor/plugins folder in your project.

Rails rvm: Howto prevent version confusion

When setting up a new Rails project (version >= 3) I would like to prevent version confusion for future team mates by including the rvm "bundle install" in the current git project. Are there any recommended best practices for doing this?
Rails 3 is integrated with Bundler - versions of Gems you use are saved into Gemfile.lock file and they will be available for everyone else using your project. bundle install will give your teammates the same versions of Gems that you have installed, so if I understand your question correctly you don't have to do anything above what Rails already gives you.

How to install paper_trail plugin on Rails 3

I'm sure this is astonishingly straightforward, and I'm just inexperienced with Rails 3, but I can't figure out how to make it work.
I'm trying to install the paper_trail plugin into my Rails 3 app; but the instructions seem designed for Rails 2. I'm running under Windows, and don't have git available.
I've tried putting gem 'paper_trail' into my Gemfile and running bundle install, which picked up the gem correctly; but rails generate paper_trail (which I assume is the new form of script/generate paper_trail fails with Could not find generator paper_trail.
Can anyone give me some step-by-step instructions to get this working?
A little late to the party. I am writing this since I found the thread through Google. Here is how I got it to work with Rail 3.0.9. I was getting the same error with
bundle exec rails generate paper_trail
as well as
bundle exec rails g paper_trail
and
rails generate paper_trail
Turns out, you need to run
bundle exec rails generate paper_trail:install
that generated the migration file for me and a
bundle exec rake db:migrate
created the table.
As of 11 October, rails generate paper_trail works as you would expect.
I've managed to make this work by simply downloading the zipped code from github, unpacking it into vendor/plugins, installing the gem (through Gemfile and bundle install), and then copy-pasting the migration code in paper_trail's generator into a blank migration of the same name.