Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Fed Up Installing Rails.... How Do I Get Rid Of The Dependencies?

 
Somnath Mallick
Ranch Hand
Posts: 482
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

Just moved into a project and have to make a web application in RoR. The problem is dont have any clue on installing Rails. I am trying v3.0.11 and every time i execute the command i get some dependency error. So all in all i am moving around in circles, downloading gems, trying to install, only to find i need more gems. Is there any way to do it in one step?



I am on WinXP, I have Ruby v1.9.3p0 and Gems version is 1.8.11.

Any help would be appreciated.
 
Mohamed Sanaulla
Saloon Keeper
Pie
Posts: 3159
33
Google App Engine Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Were you able to install rails?
On Linux environment I did have few issues with SQLlite related dependencies but then I individually resolved it and installed rails gem.

So may be you might have to resolve the dependencies? Or someone should have faced a similar issue and there might be a solution out there. Please post the solution if you are able to find one so that it will help people searching for similar issues.

But I would want the tool to resolve the dependencies and download them for me.

 
Somnath Mallick
Ranch Hand
Posts: 482
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am on Windows! Till now no luck. Got an EXE file... lets see if i can install and make it work from there.
 
Mohamed Sanaulla
Saloon Keeper
Pie
Posts: 3159
33
Google App Engine Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somnath Mallick wrote:I am on Windows! Till now no luck. Got an EXE file... lets see if i can install and make it work from there.


Rails installer? And its better to avoid using Instant Rails as its usually not updated with the latest version of rails/ruby.
 
Somnath Mallick
Ranch Hand
Posts: 482
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes that one. I am currently uninstalling all previous traces of Ruby on my PC. Then I will see if that works. I have currently got 1.3 of that. Dont know what it has inside. But i am really frustrated. I have downloaded something around 40 gem files and still not resolved the issues!
 
Katrina Owen
Sheriff
Pie
Posts: 1367
18
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd highly recommend trying out bundler: http://gembundler.com/
 
Mohamed Sanaulla
Saloon Keeper
Pie
Posts: 3159
33
Google App Engine Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Katrina Owen wrote:I'd highly recommend trying out bundler: http://gembundler.com/

This is the one that comes with the Rails 3 also right? So one has to run the bundle install from the rails app directory.
 
Katrina Owen
Sheriff
Pie
Posts: 1367
18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes that is correct. But you can use it with any project, and even Rails 2 projects (you just need to hand-roll the Gemfile).

One thing that can trip you up is that you may need to use instead of just so that you get all the correct dependencies loaded into the environment when you run the command. Same thing with the console:
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bundler is totally the way to go in Ruby-land these days.

That said, if you don't need the full Rails stack - perhaps all you're writing is a very tiny service app - then I highly recommend trying Sinatra:
http://www.sinatrarb.com/

It's super easy to get something started in Sinatra and it is compatible with deploying to Heroku.
 
Katrina Owen
Sheriff
Pie
Posts: 1367
18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I second Marc's suggestion about Sinatra. I use Sinatra almost exclusively these days, both for little experiments as well as at work, where we write small, self-contained services that expose everything via a RESTful API.
 
Mohamed Sanaulla
Saloon Keeper
Pie
Posts: 3159
33
Google App Engine Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Katrina Owen wrote:I second Marc's suggestion about Sinatra. I use Sinatra almost exclusively these days, both for little experiments as well as at work, where we write small, self-contained services that expose everything via a RESTful API.

I have been planning to explore Sinatra for writing simple RESTful APIs which are then used by my application running on Android. I like its simplicity.
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mohamed Sanaulla wrote:
Katrina Owen wrote:I second Marc's suggestion about Sinatra. I use Sinatra almost exclusively these days, both for little experiments as well as at work, where we write small, self-contained services that expose everything via a RESTful API.

I have been planning to explore Sinatra for writing simple RESTful APIs which are then used by my application running on Android. I like its simplicity.

That's a perfect use case. My first exposure to Sinatra was through creating RESTful services for small iPhone apps.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic