Error running 'requirements_debian_update_system ruby-1.9.3-p551', - ruby-on-rails

Problem facing when installing rvm install 1.9.3
in ubuntu 12.04
Please help me

The problem here is that you didn't reboot (or log out) as per the ubuntu RVM instructions so your user is not (yet) part of the rvm group, and thus has no write permissions on the logs directory.
You can fix this by logging out, rebooting or opening a new shell using
sudo su - $USER
That will create a new shell with your user with the correct rights.

You can run following command from terminal and i think it will solve your problem.
N.B: If you don't need rails simply skip command after ruby installation
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.3
rvm use 2.1.3 --default
ruby -v
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
gem install rails
rails -v

For those who may have issues after running the commands shared on every thread out there, try opening ubuntu or the Linux environment you are working with as an administrator.
search for your app (in my case Ubuntu) using the search bar on the bottom-left of your computer's screen.
if you don't see the option "open as administrator" on the right side, then right-click over the app's icon and you should see it then.
Allow the app to make changes on your computer when prompted and then try the installation commands again.
If that didn't work then try the commands shared in this or other posts, but always as administrator.

Related

How to install rails in Ubuntu 16 OS X?

I am beginner of learning rails. I want to install rails5 in my Linux operating system.
How can I install rails in Ubuntu 16.04 LTS system ?
The first step is to install some dependencies for Ruby.
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs
Install rbenv and ruby:
cd
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
rbenv install 2.4.0
rbenv global 2.4.0
ruby -v
The last step is to install Bundler
gem install bundler
Install nodejs:
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
Install rails now:
gem install rails -v 5.0.1
you'll need to run the following command to make the rails executable available:
rbenv rehash
Now that you've installed Rails, you can run the rails -v command to make sure you have everything installed correctly:
rails -v
# Rails 5.0.1
You should use RVM to install Rails. It's a virtualization system that will allow you to install multiple versions of Ruby, and maintain different sets of libraries (including Rails) for each project you work on. By default, it installs Rails and its libraries (gems) in your user directory. This is both safer (more secure) than system-wide installation, and much more flexible.
You could install Rails via Ubuntu's package manager (sudo apt-get install rails), and install its libraries via the system-wide RubyGems installer (gem), but that's not a best-practice. While Ruby and Rails don't change as often as they did a few years ago, the dev ecosystem still evolves faster than Linux distributions like Ubuntu can keep up with.
These days, everyone developing Rails apps uses either RVM or rbenv to manage user-space installations. There's no compelling reason to prefer RVM or rbenv as you start out, but RVM is more popular.

Can't connect to rails server on local machine

TL;DR I randomly can't connect to a local Rails server and the problem follows me across computers.
I'm working on a website that uses Rails.
I started my work on an Arch VM using VirtualBox. Inside that VM I could start up rails s and connect to the website at 0.0.0.0:3000 no problem. I was using Chrome from inside the VM to connect to the website.
I added one line of code. I saved the file but did NOT commit or stage. Couldn't connect anymore.
Erased the line I and saved again. Still couldn't connect.
Deleted the folder the site was in. Recloned the repo. Reran the setup script (installs things like rvm, node.js, and rails; see end of post). No luck.
Exited the VM, booted up an Ubuntu install, cloned the repo again (this time into an NTFS drive because that's where I have the most space), ran setup again. Nope.
What was weird is that even though the rails server started, I appeared to not have rails on my system.
For some reason, node installed, rvm and rails did not.
Moved to ~, cloned repo yet again, ran setup again. Same deal. Don't have rails. Although again, rails s in the setup script ran but I couldn't connect in the browser.
Installed rvm, installed bundler, ran bundle install --without production staging just like in the script, and ran the rakes. rails s. Still can't connect.
Nmap says I'm accepting connections on port 3000.
So overflowers, any ideas on how a local connectivity problem could follow me across a computer with no changes to the code base? Or how things like rails can install and not install?
Setup script:
#vagrant
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
#Dependencies
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev -y
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev -y
sudo add-apt-repository ppa:chris-lea/node.js -y
sudo apt-get update
sudo apt-get install nodejs -y
#install rvm and ruby
curl -sSL https://get.rvm.io | bash -s stable --ruby
source ~/.rvm/scripts/rvm
echo "" >> ~/.bashrc
echo "# Auto-Generated source for RVM" >> ~/.bashrc
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.0
rvm use 2.0 --default
ruby -v
#Set up repo
ssh-keyscan github.com >> ~/.ssh/known_hosts
gem install bundler
bundle install --without production staging
rake db:create
rake db:migrate
rake db:seed
rails s
You are incorrectly connecting to your rails server.
=> Rails x.x.x application starting in development on http://0.0.0.0:3000
The line above states the ip address the server is listening on.
To connect to the server located in the same machine use
localhost:3000
If your VM is bridged to your LAN and you want to access it from the host computer, first get the adapter ip using ifconfig and then use it like
ADAPTER_IP:3000
well, you should type 127.0.0.1:3000 or localhost:3000 in the browser or terminal.
Listen 0.0.0.0:3000 means listen all IP addresses in the local machine.

Can ejabberd be installed on Google Compute Engine?

Can ejabberd be installed on Google Compute Engine? Will there be any issues with using ejabberd on Compute Engine? I have looked but cannot find any references to anyone trying this before. Grateful for any help.
Yes. Compute Engine gives you VMs. You can put whatever you want on them, such as Erlang and ejabberd.
Yes you can.
You can use the Vm with Debian Image and follow this intructions.
http://www.howtoforge.com/virtual-mail-jabber-server-xmpp-with-iredmail-and-ejabberd-on-ubuntu-9.10
dont forget open the ports in the firewall.
Sorry I didn't have much time to put together a cleaner "how to". I just copied and pasted from my personal archive.
Here's what you'd have to do to compile the source code on a Compute Engine. Please let me know if you have any questions.
Image: debian-7-wheezy-v20140408
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install libncurses5-dev
sudo apt-get install openssl libssl-dev
sudo apt-get install libexpat1-dev
sudo apt-get install unixodbc-dev
wget http://pyyaml.org/download/libyaml/yaml-0.1.5.tar.gz
tar tar -xvzf yaml-0.1.5.tar.gz
cd yaml-0.1.5
./configure
sudo make
sudo make install
sudo apt-get install xsltproc
sudo apt-get install fop
cd ..
wget http://www.erlang.org/download/otp_src_R16B03-1.tar.gz
gunzip -c otp_src_R16B03-1.tar.gz | tar -xf -
cd o....
./configure --with-odbc=/usr/lib/odbc
sudo make
sudo make install
[.. Install git and clone repo here.. ]
git clone git#github.com:processone/ejabberd.git
cd ejabberd
./configure --enable-odbc --enable-mysql
sudo make
sudo make install

passenger-install-apache2-module fails on ubuntu 12.04

I've installed gem install passenger for my rails app. Now I try passenger-install-apache2-module.
I get errors screen:
Installation instructions for required software
To install Apache 2 development headers:
Please run apt-get install apache2-prefork-dev as root.
To install Apache Portable Runtime (APR) development headers:
Please run apt-get install libapr1-dev as root.
To install Apache Portable Runtime Utility (APU) development headers:
Please run apt-get install libaprutil1-dev as root.
When I run sudo apt-get install apache2-prefork-dev, I get
The following packages have unmet dependencies: apache2-prefork-dev :
Depends: apache2.2-common (= 2.2.22-1ubuntu1) but 2.2.22-1ubuntu1.1 is
to be installed.
E: Unable to correct problems, you have held broken
packages.
When I run sudo apt-get update, it doesn't solve anything. The error still exists.
Try this:
sudo apt-get install apache2-dev
I did that and passenger-install-apache2-module was able to pass the mentioned errors.
For me, the fix was to re-enable the precise-updates repository - I had disabled it in the Update Manager - and updating the system after that.
(I would have liked to only install important security updates, that's why I had disabled it in the first place.)
Try
sudo apt-get -f install
sudo apt-get clean all
sudo apt-get autoremove
sudo apt-get update
sudo apt-get upgrade
Then retry installing apache, plus all the dev packages. You may have to uninstall apache first.
There is also a pre-made package for passenger in the Precise repo:
apt-get install libapache2-mod-passenger

How to configure yaws webserver in the linux terminal?

can someone help me on to write my yaws webserver configuration file in the Linux terminal. when i follow the yaws tutorials i get errors. thanks a lot.
This is how I installed Yaws 1.89 on Ubuntu Server 10.10.
1. Update your Ubuntu system
sudo apt-get update
sudo apt-get upgrade
2. Install the tools you need to compile
sudo apt-get install gcc
sudo apt-get install libpam0g-dev
3. Download, compile and install Yaws 1.89
wget http://yaws.hyber.org/download/yaws-1.89.tar.gz
tar xfz yaws-1.89.tar.gz
cd yaws
./configure && make
sudo make install

Resources