Installing Jekyll on Linux Mint, Never recognized - ruby

I'm very much a linux noob, so pardon me if I overlooked something trivial.
http://img51.imageshack.us/img51/8081/53bv.png
I installed RVM, and ruby, and am using ruby 2.0.0. In the regular terminal (Ctrl+Alt+T), installing jekyll seems to do nothing (even though it says success).
But for some reason if I do it in the Ctrl+Alt+F1 shell, it works fine and as I'd expect it to. I have rebooted, re-installed ruby, still the same.
Is there something I need to add to my bashrc file? or my PATH? If so could someone please be so kind as to tell me exactly what to add and how to add it?

Got some insider help.
I guess in the terminal profile settings there is a Run command as a login shell that needed to be checked. Everything works as normal now.

Related

How to fix bundle install after switching to zsh?

I recently switched from hdd to ssd so i had to reinstall everything from scratch since i wanted a clean ssd and not a clone of the hdd. I am trying to set my website locally but after switching from bash to zsh (using oh my zsh), I am getting the following errors when trying to bundle install (see picture). I have tried everything i found on the internet but nothing seems to fix the errors that pop when trying to manually installing eventmachine and http_parser.
https://i.stack.imgur.com/tEI32.png
Do i have to switch back to bash and reinstall everything? (a.i ruby, yarn etc.)
Thank you.
Fix : Deleting path for ruby gems from .bash_profile and adding it to .zshrc.
export PATH="/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.0.0/bin:$PATH"

Installing portable ruby and portable xampp in order to use compass and sass in my windows machine: Is that possible?

I want to try using SASS and compass. As I´ve read that compass runs in ruby, I need to install ruby on my local windows machine in order to go and play with it.
I thought on installing everything in a portable way, I mean in my pendrive.
I´ve download a portable ruby version and a portable xampp version, and I´ve installed both in my pendrive.
My question is: As I´ve haven´t worked with ruby ever, should I just run the ruby app and the xamp app and then just install compass in there?
I´ve read compass installing version, but I don´t know how to install it using the command line inside the pendrive.
Thanks for your help!
I´ve found somewhere else the reply to this, and just in case anyone wonders the same thing, here´s the fastest way to use SASS when you have windows and don´t know a word about ruby, but you read that you need it in order to use compass:
You can install ruby in your windows pc using this. I´ve tried the portable one but didn´t worked in my case.
After that you have to open a special console window (the one with ruby activated). There´s this icon called "start commend promt with ruby" that does exactly that. It is in the same folder as your ruby installation.
You just type this: gem install compass
No, you don´t have to download nothing, it just installs the application.
You don´t need to use the command line anymore, nor you have to pay for the compass.app: You have the free alternative Scout. You install it and from that moment you can work with it.
Maybe you should read these aswell:
http://thesassway.com/beginner/getting-started-with-sass-and-compass
http://andrewpwatson.com/posts/how-set-compass-sass-windows-aptana-studio-3

No progress installing ruby via macports. How long should this action take?

I'm in the process of installing ruby using macports. I typed the following command into terminal:
sudo port install ruby
Terminal responded by returning some lines that indicated the action was working, then it just stopped returning any new lines. I typed:
which ruby
and didnt get a response, so I closed the terminal window and consequently ended the processes.
I opened a new terminal window and re-typed the original install command and now I get the following message:
Waiting for lock on /opt/local/var/macports/registry/.registry.lock
How should I proceed from here? Should I just wait? If so, how long? Will terminal try to complete this action twice? How can I know if it's working?
A more appropriate thing to check, when you've seen no progress, is your system's activity.
On Mac OS, you could either open "Activity Monitor" and sort by CPU, or open a terminal and type top -o cpu. Watch for some app showing consistent activity, especially something with "port" in the name.
To deal with the lock... odds are REALLY good it's stale since you cut it off at the knees by closing the terminal, so use sudo rm /opt/local/var/macports/registry/.registry.lock to remove it and retry if you want.
I will recommend RVM for installing new versions of Ruby. It's really convenient. Before you jump into RVM read the "Installation" and "Rubygems" pages entirely, and after installing RVM type rvm notes and follow the directions it spits out.
Finally, do not, under any circumstance, no matter how good an idea it seems to be, try to replace or upgrade the system version of Ruby installed by Apple. Apple installed it for their own use, and messing with it invites bad juju.
"Waiting for lock on /opt/local/var/macports/registry/.registry.lock" means MacPorts is already running and doing things. You could check for any running "port" processes in Activity Monitor. Wait until these tasks are finished (or terminate them if you don't care that they don't finish) before trying to do other things with MacPorts.
ps -A | grep tclsh if you can't find the running process so you can kill it.
A more recent way to install Ruby is via RVM. Not a direct answer to you question, but I would highly recommend it.
Here is another vote for rvm. If you are like me, and you program on a mac, but you deploy to some other *nix, then you can make sure you have the same version of Ruby (and Rails, and gems) on each, using rvm's gemsets.
Also, you can switch among gemsets easily, so that if you find a gem that you can't get working right with Ruby 1.9.2, then you can switch to 1.8.7 or some such whilst you try to figure it out. Stuff like that.
As far as I'm concerned, you can jump right in on your mac (as yourself, not using sudo) with rvm install 1.8.7 or rvm install 1.9.2. Then make sure you switch to use the correct rvm, and make the one you want your default, and you're golden. If it doesn't work, delete it - all the gemsets will be installed below your home directory in .rvm/*
The pain you are going through now will resurface when you try to keep your system version of Mac's ruby working with all the stuff you write -- RVM is definitely easier than using Mac's Ruby.
In addition to what the Tin Man mentioned, if other "lock" errors start coming up, I found disabling the internet connection for a moment was helpful to stop all port processes that were occurring.

Installing Ruby on Mac 1.9.2, still getting 1.8.7 even though path changed

I'm on a Mac running 10.6.4 Snow Leopard, and apparently ruby comes ready to go. But I'm new to Ruby, trying to learn the Rails framework, and so i decided to install the latest version 1.9.2. I followed the instructions here, but after I compile and install, when I run ruby -v I'm still getting 1.8.7. Anyone can help a noob out?
When I use which ruby I am getting usr/local/bin/ruby, so the path has changed and is correct.
UPDATE:
It seems I was having issues because I was using two login files to set my path (.bash_login and .profile). You can only use one, and the first one that exists and is readable will be used. I eventually switched to RVM and used .bash_login to load RVM into shell.
Well, the sw isn't lying to you. So something is not as you expect.
Try /usr/local/bin/ruby -v and see what version it is.
Added: Also, try locate ruby|more to see where the ruby files are on your system.
You may need to change your path to use your newly installed copy of ruby.
Added more: did you add the Path to your ~/.profile file as the instructions tell you to do in step 1?
Did you restart your terminal session after changing the ~/.profile file? (Quit and restart terminal.)

The command "ruby" does nothing on my Mac

I can't get the Ruby interpreter to run on either of my Macs (one MacBook and one MacBook Pro, both running Snow Leopard). When I run it, by typing ruby in Terminal, nothing happens. It just sits there. I can kill it by pressing Ctrl+C, but that's it. I know the Ruby process is running, since I can see it in Activity Monitor, and running ruby --version works fine.
I have tried the following, all to no avail:
I have some bash customizations, so I tried disabling them, but that didn't help.
I installed a new copy of Ruby 1.8.7 using MacPorts, but that one had the same problem.
I tried quitting and restarting the Terminal application.
Some other information that might be useful:
I'm trying to run the version of Ruby that comes with Snow Leopard.
I have installed Apple's developer tools.
Other interpreters (Python, Io, etc.) work fine.
I spent a while tonight searching for this problem online, but haven't found any discussion of it. I'm at a loss for what could be causing it, so any help anybody can provide would be greatly appreciated.
Ruby command itself will just behave the way you said, either provide it with script file or use the -e option:
ruby -e ' puts "hello world" '
However I suspect that you want the IRB(interactive ruby). Run irb in your shell.
What are you trying to do, exactly? The ruby command expects input, in most cases a file that contains Ruby code that you want it to run. In that case you have to specify the name of the file:
> ruby my_ruby_file.rb
If instead you want to run the interactive Ruby shell, i.e. the REPL console that you can type Ruby code into and have it executed each time you press enter, the command you want is irb.

Resources