Forum: Ruby on Rails Develop using Rails in offline mode

Posted by Elmer A. Sia (Guest)
on 2012-11-07 14:39
(Received via mailing list)
I'm very new to Rails and I'm quite confused if I can practice Rails in
offline mode?

I'm following the Ruby on Rails Tutorail by Michael Hartl and I noticed
that after generating a new app through the command "rails new 
app_name",
"bundle install" is then called to download the gems specified in the
Gemfile.

What if I don't have an internet connection? Can I still play with 
Rails?
Posted by Norbert Melzer (Guest)
on 2012-11-07 14:44
(Received via mailing list)
Short answer: Yes!

Longer Answer: Yes, but you have to generate your app before going 
offline,
after all gems are installed there is no need to go online any more.


2012/11/7 Elmer A. Sia <pragmaticpanoy@gmail.com>
Posted by Saikiran Mothe (saikiranmothe)
on 2012-11-07 14:44
(Received via mailing list)
Elmer,

*Rails* is a also a*  ruby gem*,you need to install dependencies from
http://www.rubygems.org

Once you finish *bundle install* you can play.

Thanks,
Saikiran Mothe
Posted by Saikiran Mothe (saikiranmothe)
on 2012-11-07 14:51
(Received via mailing list)
If you want install any single new gem on your app.then you need to go
online.

Your developing a web-application.

Elmer,Try to get a internet connection asap.

That will be more helpful for you.

Thanks,
Saikiran Mothe
Posted by Elmer A. Sia (Guest)
on 2012-11-07 16:16
(Received via mailing list)
Sai Kiran Mothe, Thank you, but I am just wondering, "what if I am in a
remote area with no internet connection and want to play around with
Rails". I just need an answer for that

Basically a good idea is to list down the gems needed by my app and gems
that I think I can use and then download them through "gem install" 
command.

After that I can play around without an internet connection?

 :D
Posted by Walter Davis (walterdavis)
on 2012-11-07 16:30
(Received via mailing list)
On Nov 7, 2012, at 10:15 AM, Elmer A. Sia wrote:

> Sai Kiran Mothe, Thank you, but I am just wondering, "what if I am in a remote 
area with no internet connection and want to play around with Rails". I just need 
an answer for that
>
> Basically a good idea is to list down the gems needed by my app and gems that I 
think I can use and then download them through "gem install" command.
>
> After that I can play around without an internet connection?

I think you'd need to be on a network for bundle to work. Once you've 
bundled an app, you can continue to work on it, but I doubt that bundler 
would work without a net -- the first thing it does is try to read the 
latest updates from rubygems.org. You can simulate this pretty easily by 
disabling all of your network and trying to run bundle update in an 
existing (working) application. See if it succeeds without giving up.

Walter
Posted by Hassan Schroeder (Guest)
on 2012-11-07 16:57
(Received via mailing list)
>> After that I can play around without an internet connection?

Yes, absolutely. Anyone who's ever worked on an app aboard a
plane without WiFi can attest to that  :-)

> I think you'd need to be on a network for bundle to work.

For bundle install or update, yes, but not for e.g. bundle exec.

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Posted by Walter Davis (walterdavis)
on 2012-11-07 17:39
(Received via mailing list)
On Nov 7, 2012, at 10:55 AM, Hassan Schroeder wrote:

>>> After that I can play around without an internet connection?
>
> Yes, absolutely. Anyone who's ever worked on an app aboard a
> plane without WiFi can attest to that  :-)
>
>> I think you'd need to be on a network for bundle to work.
>
> For bundle install or update, yes, but not for e.g. bundle exec.
>

Yes, good point.

Walter
Posted by Saikiran Mothe (saikiranmothe)
on 2012-11-07 18:51
(Received via mailing list)
If got any error in middle of that.No one will be help you.if you have
internet connection,the rails world is behind you to help out.

Think about it.

Thanks,
Saikiran Mothe
Posted by Elmer A. Sia (Guest)
on 2012-11-08 08:53
(Received via mailing list)
On Thursday, November 8, 2012 1:50:41 AM UTC+8, sai kiran mothe wrote:
>
> If got any error in middle of that.No one will be help you.if you have
> internet connection,the rails world is behind you to help out.
>
> Think about it.
>
> Thanks,
> Saikiran Mothe
>


I'll just download the API documentation of the gems and some Rails 
guide +
ebooks, then. If there's a will there's a way. I can always play around.

Thanks to all who replied "positively" to my question. :D
Posted by Sam Pizzey (Guest)
on 2012-11-08 14:26
(Received via mailing list)
If you already have the gems required by whatever you're running,
`bundle install` doesn't hit the network - so, if you've already
generated one app successfully, you can continue to generate/work on
more offline without issue.

There are ways around this problem if you absolutely must, but in
general it's expected that you have internet access at least
sometimes.
Posted by Iain Davis (Guest)
on 2012-11-08 14:27
(Received via mailing list)
You can. To avoid being slowed down by needing to download Gems and 
being
offline, you can use the "final version" of the Gemfile for the 
sample_app,
which is listed in listing 9.49 (In Chapter 9) (don't forget to use 
bundle
install after editing your Gemfile!). Hartl mentions it early  in 
chapter
3, where the main project for his book (the "sample app")
begins.

Iain
Posted by Elmer A. Sia (Guest)
on 2012-11-09 02:31
(Received via mailing list)
Noted!
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.