Can anyone help me installing ruby and jekyll packages in linux host under an application account without root access?
If you want to install ruby on a server where you only have a user account and no root privileges, you can build it from source. RVM is a tool that can help with this, that can be installed locally. You may run into issues with missing tools (like a compiler) or dependencies. Depending on what is missing, you may be able to upload it to your user directory some where and continue trying to build ruby. How much work this will be depends on how much is already present on this host.
Although, I will go a bit further and say, if you're planning to use jekyll to generate a static site and server the pages from this linux host, it's probably going to be easier to install ruby and jekyll locally and generate the static site from your development computer, and just upload the results to the server.
Related
Is it possible and if so what is the best way to do it? I heard a friend talking about bitnami and so on. Please advice
You can save you image to tar and copy with USB and loaded it back.
Save your mage: https://docs.docker.com/engine/reference/commandline/save/
docker save image_name > filename.tar
Load image from Tar(No internet access required):
https://docs.docker.com/engine/reference/commandline/load/#examples
docker load --input filename.tar
You can use Bitnami Ruby stack https://bitnami.com/stack/ruby. The only moment where you may require internet is for downloading the gems that your application may require. After that, you should be able to work in your local environment without issues. Another alternative is to download the gems from another machine and install it in your local system.
It is possible to build a RoR application without internet access but it is not possible to deploy it. You could, however, run a hotspot off of a phone or something purely for deployments.
I have some simple sinatra apps that make use of the OTA COM dll for talking to Quality Center.
I want to move those sites into docker images, so I can host them on my docker server.
It occurred to me that theoretically I should be able to get this working with strategic use of wine.
Hint: I remember reading somewhere that to get Win32OLE working in Ruby from linux you can install the windows version of ruby using wine, then run your scripts through the windows version of ruby.
https://www.ruby-forum.com/topic/88576 says
i've managed this before. i installed the one-click installer under
crossover office and the used that. another option is installing
msys, compiling ruby under that, and then using that ruby. in any
case you need to install/build another ruby under the crossover environment.
and later
In the end I installed office 2000 with Crossover, then I used the
windows installer to install windows ruby into the same bottle as
office. Finally I put the following bash script in my /usr/bin directory
so I can run my ruby files with '#> wruby some_script.rb'
==/usr/bin/wruby
#!/usr/bin/env ruby
`/opt/cxofficebeta/bin/wine --bottle myBottle --cx-app ruby.exe #{ARGV.join(" ")}`
I know nothing about Wine or crossover or bottles(?), so I'm out of my depth.
How would I do this? What would a Dockerfile I could use as a base image look like?
Note: I found some docker images that claim to install wine (which may make a good starting point)
https://registry.hub.docker.com/u/ambakshi/wine-x11-vcpython27/
https://registry.hub.docker.com/u/monokrome/wine/
https://registry.hub.docker.com/u/yantis/wine/
http://www.perlmonks.org/?node_id=430194 talks about getting Win32::OLE working under ubuntu.
Don't forget to use a USER xx in your Dockerfile as it is important to use a non privileged user in wine. You will find in registry.hub.docker.com several examples of wine with such a user.
I've been trying to help a developer in my company who was having trouble installing gems via the command gem install for example gem install cucumber. The problem seems to be proxy related in that the ruby program/command prompt (I don't pretend do know what it is) cannot get out through the proxy. We set the variables for a proxy bypass we have but it simply doesn't work.
We have a direct internet connection available for testing and when the PC was connected to that, the gem install completed just fine, confirming our firewall suspicions.
Our security team won't simply allow a program or PC to access whatever it wants on the Internet, and for other programs an exclusion is made for the IP address the program wants to connect to. I'm of the understanding that ruby gems may connect to a number of different IP addresses in order to download and install gems.
Does anyone know, or is it possible for me to find out all the possible IP addresses that installing gems may require?
If any of this sounds like a bad request, it's just my lack of understanding around ruby gems, installing gems etc. Hopefully you get the idea.
Thanks.
Hello: I have a windows machine and a linux machine that both have the gems, ruby version, rails version, etc that I need. I want to copy the configuration for the Windows box to a couple of other windows boxes, and do the same for the Linux boxes (Ubuntu). I will move these to a studio whereby it won't have access to the internet during my stay.
I will install the same ruby version, and then I want ALL gems and configurations to be consistent and up to date across the board using the configs of the Linux and Window boxes as my guide. Can anyone advise how to do this if possible? For example, what folders/files would I need move, or can I simply copy and past the entire install of each config and paste them to the new boxes.
Thanks,
STS
You are probably looking for the Bundler. It makes such tasks very easy. Just don't forget to reinstall bundle on the different system. Everything is kept, packages are specified in the Gemfile.
Just read docs, it's very intuitive to use.
I love RVM. I realize that the main use case for it is letting different users switch between different versions of Ruby. But let's say I'm deploying a Rails app to a server and I just want a single version of Ruby running. In particular, I want 1.9.2, which is a breeze to install with RVM but a pain without it. Is there a way that I can say "I want this to be the canonical Ruby installation for all users" (along with all of its gems) without having to create a bunch of symlinks by hand and change them every time I update to a newer Ruby release?
Install RVM as root and do a sudo rvm use 1.9.2 --default. Any user sourcing /usr/local/rvm/scripts/rvm will per default have 1.9.2.
I know this doesn't quite answer your question, but:
I ran into several problems with installing RVM globally and resorted to using one user account for deployment and for all Ruby / Rails processes -- that users account exists on all dev and production servers, and the .rvm directory is rsync'ed from one dev-server to all other servers.
How many different users on your App servers do really need to access Ruby 1.9.2?
Can't you just trim that down to just one user? That worked best for me.
Note:
One thing you probably want to avoid is to install RVM on your app server(s) manually and then install Ruby and Gems on the app server ... you don't want to keep tools like cc lying around on your production servers for security reasons! rsync'ing the .rvm directory is far safer! and the result is far more consistent!