Bundle Install very beginner problem - ruby-on-rails

Okay I'm basically day 1 at programming trying to follow Ruby On Rails 3 by Hartl... its not going well and I seem to be getting stuck every step of the way.
Right now I'm on page 19 & 20, not sure if I did it correct since it didn't really explain to well what it means but I get an error message. I did look thought other questions on here and didn't find any that were as beginner as mine that I might even understand.
For those without Hartl's book I found this page has it all: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec:the_first_application
So where it says to update the Gemfile I amended the document in TextMate to read gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'. The book then says:
Once you've assembled the proper Gemfile, install the gems using bundle install:
$ bundle install
Fetching source index for http://rubygems.org/
What I did was amend the file and just hit save, I'm not sure if that's what it means by assembling it or if there is something more I need to press. Looking through the menus in Textmate, nothing jumped out at me. When I then typed in bundle install I get the message unknown command bundle
Any advice in basic terms would be very helpful as I'm obviously a complete beginner at this. Thanks!
Ryan

In order to use the bundler gem, you'll need to first install it.
gem install bundler
Then you can use:
bundle install

Related

Rails gem git source not checked out

I was using the best_in_place gem on a project but decided it was not needed and removed it from the gemfile and the other references to it on my code.
Now everytime I run a rails command I got this error
The git source https://github.com/aaronchi/best_in_place.git is not yet checked out. Please run bundle install before trying to start your application
I dont even have this gem installed anymore, I created another gemset on rvm, reinstalled rails, reinstalled ruby, followed the steps on https://github.com/bundler/bundler/blob/master/ISSUES.md
No success yet...
The following page may have what you're looking for. If so, we might need to mark this as a duplicate:
is not checked out... bundle install does NOT fix help!
Let me know if that's not the case.

Ruby on Rails - How can I resolve this 'rake db:create' error?

I am trying to get a simple tutorial app up and running with Rails, but have run into this problem almost right away. I create the new ruby app, cd to the directory and run rake db:create. I get the following
Please install the sqlite3 adapter: 'gem install activerecord-sqlite3-adapter' (sqlite3 is not part of the bundle. Add it to the Gemfile.)
But I do have the gem added to the Gemfile, like so:
gem 'sqlite3'
Also, when I tried to gem install the adapter, I was given an output saying that it did not exist in any repository. This is my first time using rails, any ideas on how to fix this?
*Edit
gem install activerecord-sqlite3-adapter produces the following:
Error: Could not find a valid gem 'activerecord-sqlite3-adapter' in any repository.
The it offers some alternatives, only one of them being sqlite3. It is called activerecord-jdbcsqlite3-adapter. Is this the one I need possibly?
Thank you for everyone's input. I never was able to resolve this issue, and ended up just using the Rails Installer instead. So much easier, just make sure you delete all your previous versions of Rails, Ruby, Gems, everything. Then use the installer.

Not able to view site in browser with railsinstaller due to missing Gem

I am super, super new at programming and I have been trying to get everything set-up on my computer. I have installed RailsInstaller, go to >railsinstaller_demo, and type in rails s. I get the following error though could not find gem 'uglifier <>= 1.0.3> x86-mingw32'
I looked through the forum and found how to do a gem list and i noticed it was not there. I then went to gembundler and ran $ gem install bundler. I tried again but it did not work.
I am sure the answer is on this site, but i am so new that i see all these lines of code I actually have no idea where to type it in.. I am running Windows 7.
thanks for taking the time to help out a real beginner.
Have you gone to the $ railsinstaller_demo directory and run the bundle install command? This will install the gem dependencies for the application; you will not be able to run the server until you've bundled the gems. Additionally, if you're still having issues with the uglifier gem, go ahead and remove the line in the Gemfile and then run bundle install
If you need further help with the Command Prompt, you an find out more at http://bit.ly/ZajVeW.
Thanks,
Evan

I don't completely understand the gemfile in a rails application

What is the difference between installing a gem from the command line
sudo gem install gem-name
and writing your gem into the Gemfile and running bundle install?
I think the problem is that I don't understand the exact purpose of the Gemfile. So far it seems like it is a place to list all of the gems that your app is dependent on.
Installing a gem via:
sudo gem install gem-name
is going to install that gem system wide.
Whereas installing them via the Gemfile is specific for your rails app(to keep track of dependencies, version, app portability etc).
The best source of the whats and whys about Bundler, is probably this page:
http://gembundler.com/rationale.html
That page has great examples and explanation about why Bundler is useful and in some cases, necessary.
I always thought you write all gems that your app is dependent on in it, and then if you want to port your application somewhere else, you can run the bundle install and it'll grab the gems you need for you so you don't manually have to do it.
This might clear things up, I quote:
'It holds information about all the project dependencies so that you don't need to struggle to figure out what gems you need to install.'
http://blog.despo.me/42762318

spree commerce in Rails

I am newbie to Ruby on Rails and I would like to install "Spreecommerce". Could I have some help on doing this? I don't know where to start. Any help will be highly appreciable, thanks!
You are talking about Spreecommerce. Next time, try to add a link to the project/gem/plugin you are talking about.
Install the gem, on the command line like this:
gem install spree
Or, go to the Gemfile of your project and add the following line:
gem 'spree'
Then type this in the command line:
bundle install
Then, go to the official github page and read the documentation of this gem to get more information about it and how to use it. There is also this official getting started page that you need to read.

Resources