Re: [Rails] Develop using Rails in offline mode

214 views
Skip to first unread message

Norbert Melzer

unread,
Nov 7, 2012, 8:42:43 AM11/7/12
to Rails Mailinglist
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 <pragmat...@gmail.com>
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?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/G7_H8n2rnZAJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

saikiran mothe

unread,
Nov 7, 2012, 8:42:17 AM11/7/12
to rubyonra...@googlegroups.com
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

saikiran mothe

unread,
Nov 7, 2012, 8:50:42 AM11/7/12
to rubyonra...@googlegroups.com
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

Elmer A. Sia

unread,
Nov 7, 2012, 10:15:50 AM11/7/12
to rubyonra...@googlegroups.com
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

Walter Lee Davis

unread,
Nov 7, 2012, 10:29:29 AM11/7/12
to rubyonra...@googlegroups.com

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

>
> :D
>
> On Wednesday, November 7, 2012 8:44:02 PM UTC+8, Elmer A. Sia wrote:
> 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?
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/0ulGbZTrA4sJ.

Hassan Schroeder

unread,
Nov 7, 2012, 10:55:39 AM11/7/12
to rubyonra...@googlegroups.com
>> 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.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

Walter Lee Davis

unread,
Nov 7, 2012, 11:38:32 AM11/7/12
to rubyonra...@googlegroups.com

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

> --
> Hassan Schroeder ------------------------ hassan.s...@gmail.com
> http://about.me/hassanschroeder
> twitter: @hassan
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.

saikiran mothe

unread,
Nov 7, 2012, 12:49:55 PM11/7/12
to rubyonra...@googlegroups.com
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

Elmer A. Sia

unread,
Nov 8, 2012, 2:52:09 AM11/8/12
to rubyonra...@googlegroups.com
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

Sam Pizzey

unread,
Nov 7, 2012, 9:01:39 PM11/7/12
to rubyonra...@googlegroups.com
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.

Elmer A. Sia

unread,
Nov 8, 2012, 8:29:52 PM11/8/12
to rubyonra...@googlegroups.com
Noted!
Reply all
Reply to author
Forward
0 new messages