Develop using Rails in offline mode

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 H. 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?

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 [email protected]

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

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

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?

:smiley:

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 :slight_smile:

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 S. ------------------------ [email protected]
http://about.me/hassanschroeder
twitter: @hassan

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

On Nov 7, 2012, at 10:55 AM, Hassan S. 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 :slight_smile:

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

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

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. :smiley:

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.

Noted!

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs