I have a Windows 2012 server that is on an internal network. I used Railsinstaller to put the basic framework on the system. Rails new doesn't work when I reach the bundler section since I can't reach the net.
I have used "gem install rails -i repo --no-rdoc --no-ri" on a net accessible system then placed the gems on my server and ran "gem install --force --local *.gem".
Then "rails new D:\DTS_WEB --edge" and now fail at "unable to connect to github.com". Trying to start the rails server fails telling me that nothing has been checked out.
I modified my gems file with "gem 'rails', path: '....\Ruby2.2.0\lib\ruby\gems\'" but it still tries github.
I installed git with Railsinstaller along with rails. How can I get past this last obstacle and force everything to use local resources?
Is it possible to build everything on the net accessible node and just copy it into place on the server to use? My first attempt at that failed.
As of 2024, the --path
option is deprecated. You can tell Bundler to install your gems to a directory within your project using
$ bundle config set path .bundle/gems
This will update .bundle/config
to indicate which path to use, and put your gems in .bundle/gems
.
On a machine that has a network connection, you can install your app's gems to a directory within the project using --path
:
$ bundle install --path=vendor/bundle
Then, you can copy the project folder (along with all the gems in vendor/bundle) to your internal machine.