简体   繁体   中英

rails offline installation in windows

I want to install ruby on rails in offline mode (ie without internet connection). So I downloaded railsinstaller-3.2.0.exe from http://railsinstaller.org/en and installed it. By the end, I had ruby installed but in order to have rails installed I ran

gem install rails

and faced these errors: (meaning command needs internet connection)

ERROR:  Loading command: install (ArgumentError)
        unknown encoding name - CP720
ERROR:  While executing gem ... (NoMethodError)
        undefined method 'invoke_with_build_args' for nil:NilClass

I mean is there any solution like downloading gems with another computer connected to internet and then copying files in the proper location in the installed directory of gems.

Please help me if you have any idea.

As said in a comment, it's a gem (lib) dependency issue.

You might want to look into installing the bundler gem library to manage dependencies for you, with bundler you would just have to run, bundle install and it would download all the required gems for you including any gem dependencies.

You can install bundler simply, just run

gem install bundler

Then in your rails project directory, just run bundle install.

Often to run a project (like rails for example) you might have to start it with

bundle exec rails start

To install Gem's on a non-internet connect computer you might want to refer to this answer on just that problem.

This is the website where you can find all available ruby gems. Ruby gems download. Find the one you are interested and download it.

Then move the gem in a directory of your choice and cd into that from the command prompt. I am using C:/ruby193/bin/pony-1.4.gem

Let's say that the gem we are interested in is the pony gem (smtp email).

Just type gem install pony-1.4.gem

and you should get it installed manually unless you have a restricted acc with not adequate administrative privileges.

You can also refer to the official documentation on the matter.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM