Programming :: Error In Ruby Program
Nov 18, 2010I have the following code:
Code:
And it gives this error:
Code:
I have the following code:
Code:
And it gives this error:
Code:
I am using Red Hat Enterprise Version 5. There is a ruby program which use standard input as its input (e.g. the Ruby program process input from standard input). I think standard input should be keyboard, correct?
So, I think other kinds of input (non-standard input) should not work (i.e. the ruby program should not be able to read input from such non-standard input), but actually I have tried using pipe works, I am so confused because I think pipe should be some other kinds of input -- other than standard input, why it could work? i.e. put text "123" in abc.txt with pipe, could achieve the same result as using keyboard as input to type "123" for the ruby program.
cat abc.txt | ~/test/rubysrc/foo.rb
I've been using rubyripper quite happily on Karmic, now I've moved to Lucid and discovered a bit of an issue. rubyripper will pause for several minutes between tracks with ruby 1.8. If I upgrade to ruby 1.9.1 the gui client won't run due to an issue with libgtk2-ruby not being available for 1.9.1.
The cli version of rubyripper under 1.9.1 is blazingly fast, so that is what I'm using at the moment, but I do prefer the gui.
Anyone have any insight into this? Googling suggests there may be a bug in ruby 1.8.7 that caused the long pauses, but it was supposed to have been fixed in 1.8.7.249 i.e. the default Lucid version.
There are a few things not working properly. Ruby version manager seems ok but untill i get working with ruby i don't know if it is working properly. One thing that is not there is irb Interactive ruby is not available according the the message i get.
Well i have no idea what readline is but i did everything that is on that webpage referance page [url]. I have got a lot of progress and learned heaps about linux shell and bash terminal. The thing is i need to get this going and have tried feenode but it is very foreign and how it works i do not have a clue. I have got 2 things resolved so far through this forum but using other threads in it. i need to get irb going before i can progress to using ruby on Rails properly.
I am using a Eeepc running ubuntu easy peasy its version 9.04 of ubuntu. I need the whole of rails to work and want to get a handle on using ruby version manager along with the apache stack with mysql/phpmyadmin and am using this as a dummy run for setting up a development system.
What are some popular web applications that I've seen that use ruby?
View 1 Replies View RelatedI'm going through the Beta version of "Agile Web Development with Rails - 4th Edition". But I'm having difficulty with initial configuration on my Gentoo box. I started like so, basically following the book:
Code:
$ rails testrails
$ cd testrails
$ script/generate controller Say hello goodbye
[Code]...
The following is the error in my program :
Here is my program...
Code:
Above is a code for UDP server which I am trying.
When I compile it I get following errors
Code:
I am using the C++ compiler G++ to compile my programs on Linux Mint 8 - Gnome.
I recently installed QT and when I tried to compile a simple "Hello World!" program it gave me this error:
Quote:
This is the code in HelloWorldQt.cpp:
Code:
I have tried using GTK instead but I get a similar error.
I'm building my main program on SUSE using C, but the compiler returns the error below.
Code:
Here's my code to which the errors are pointing to:
Code:
I've created 3 files: swap.h and swap.c then make static library from it
Code:
Then I write 2 program to test this library: test_swap.c and test_swap.cpp
I compile
Code:
What's wrong with this in C++? And how can I make a library that can work both for any C and C++ program?
Here the source code
Code:
Code:
Code:
I was trying to get the ssid of WLAN through the following C program
What is the cause of this error?
I have a program which reads some parameters in from an input file before solving a differential equation. This program compiles fine, I'm using Numerical Algorithms Group (NAG) libraries to solve the differential equation so I'm also the NAG compiler called nagfor.
The namelist I have is declared as follows:
And the input file is:
When I run the code I get the following error message:
I really can't see what's wrong with this code.
Also, I'm using Fedora 11, and running the code in tcsh if this is relevant.
I am currently trying to get my RadRails working. There are certain tasks I cannot complete and I'm guessing that installing mongrel and some other items would get everything going. I run the update and it seems to fail horribly and I've been looking on google for the last 2 hours to the answer to this one. This is there errors I have gotten so far.
By the way I am currently using Ubuntu 10.04 if that makes any difference. I have already downloaded and installed sqlite3 and sqlite dev.
Code:
>gem install -l mongrel-1.1.5.gem
Building native extensions. This could take a while...
ERROR: Error installing mongrel-1.1.5.gem:
ERROR: Failed to build gem native extension.
[code]....
Now at this point I am just trying to find the intern.h header file and can't find out what to download to get that.
I have a simple C program which uses ncurses library and I am having linker issues and couldn't get the program to link.
[Code]...
So I think the ncurses libraries are in place but gcc still couldn't link. I am totally stumped.
I am using Ubuntu 9.04 linux 2.6.28-11-generic. When I write a program that gives the "Segmentation fault" error, or when I send this signal (SIGSEGV) to a program, the "Segmentation fault" is shown and no core dumped. When I look for "core" file in the current directory, I can't find it, too.
View 2 Replies View Relatedi am graduate student and my X colleague gave me this Fortran 77 program to run my result files with. She is no longer reachable. I compiled the following program with gfortran, it compiled well but, when i run it, gave me end of file error. My output file (which is the input file for this program (DFILE1) ) has about 78,000 lines of velocities of atoms (Vx, Vy, Vz with 1000 steps.. an example of some of the atom's velocities in the 1st step is given at the end of this program). I will be highly obliged if any one can help me with this.I run this program on opensuse linux 11.3 version /32 bit/i586
error message:
Code:
At line 124 of file v.autocorrelation.f (unit = 10, file = 'DFILE1')
Fortran runtime error: End of file
Code:
PROGRAM TCORR
COMMON / BLOCK1 / STORX, STORY, STORZ
COMMON / BLOCK2 / VX, VY, VZ
COMMON / BLOCK3 / VACF, ANORM
C *******************************************************************
code....
I am getting a linker error for a simple program to represent a singleton class.
Find below the program which I have written:
I've got an error with compiling a program: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib/python2.5/config/libpython2.5.a: could not read symbols: Bad value collect2: ld a retourn 1 code dtat d'excution make[2]: *** [bindings/_yafqt.so] Erreur 1.
View 1 Replies View RelatedBelow are the header files and the program:
using namespace std:
The error is: error while loading shared libraries: libncurses.so.5: cannot open shared object file: Error 24 This occurs after a good time of running, after I added some file stuff to my code. I can't see why this is happening.
Code: Code:
// Get CPU Temperature
char sensorsRaw[128];
system("sensors >& .sensors");
std::ifstream fileIn;
fileIn.open(".sensors");
[Code]...
I will have to code this. However I am lacking of time since I have too much to do. make a short code bash/dash to prompt the country with Zenity, then, get the PLS or m3u url and prompt with another zenity which radio to play. http://www.listenlive.eu/index.html
My code to get url's radio country.htm is:
Code:
Ok so Basically i have 2 questions
1. i know how to create a file with c++ using but is there a way to save it to a specific location on your computer with windows and linux
Code:
2. i need to know how to run/execute/open a file in a c++ program im using and its not working
Code:
im trying to build a simple program for my C programming class, this is the source code
#include <stdio.h>
int main()
{
int length, width, length, height, area, perimeter;
perimeter = width + length + height;
area = width * length + heigth;
[Code]...
i dont see any error (you might)but every time i run it it runs but after it asks me to input for the width i do it but it doesn't take me to the length, it just stays blank until i input another value in the same place for the width, it asks me for 4 inputs in total i don;t know why, and after i run it different times it gives me different values for the perimeter and are. how can I fix this?
Is there a way to install ruby on Fedora 14?
View 1 Replies View RelatedEverytime I tru to install that gem with gem install mysql I get this output :
[CODE]
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
checking for mysql_ssl_set()... no
[Code]...
I would like to install the rmagick gem under ruby ree-1.8.7. Like every time, the installation routine does complain about two different version being installed which are actually the same. I have every, really every imagemagick package installed:
Code:
ImageMagick-6.6.1.0-3.8.i586
GraphicsMagick-1.3.12-1.15.i586
libMagick++3-6.6.1.0-3.8.i586
libGraphicsMagick3-1.3.12-1.15.i586
[Code]...
(Using Archlinux) I downloaded Ruby 1.8.7-174 a while ago and installed it via the tarball (not pacman). I was trying to update to 1.8.7-299, but I can't get it to work. Per the readme, I do the following steps, all of which complete without error:
./configure
make
make install
After install finishes however, I still have -174 installed instead of -299.
Terminal, I type ruby, I hit enter, and nothing happens. I'm given a blank line that I can type and enter, and again, nothing happens. I'm stuck, is there a way to fix this without closing the terminal window?
View 1 Replies View RelatedHas anyone been able to successfully install rmagick on slackware 13.1? On both my systems (one multilib and one 32-bit), it complains about having a 'partial' ImageMagick install!
Code:
$ sudo gem install rmagick
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
[Code]...