You are not logged in.

#1 2012-04-08 21:11:24

adamchow
Member
Registered: 2012-04-08
Posts: 7

Help installing Ruby on Rails 1.9.3 + Postgres + NGINX arch 2011.10

Hey, Im new to these forums, did some searching but couldn't find anything to my needs.

Anyone have done this before, or steps I should take to get this running?  Any guides that work to my spec?

I jus did a clean install and upgrade with the latest packages,

My setup i prefer, Ruby 1.9.2 or .3, and Rails 3.2.2, or .3 Postgres databases, and NGINX as the web server, along with mongel.

I will be having multiple rails apps running at the same time. Not sure how this gets setup either.

I am hosting this on Rackspace cloud servers.

Thanks,
Adam

Last edited by adamchow (2012-04-08 21:23:19)

Offline

#2 2012-04-11 13:35:48

SPK201
Member
Registered: 2011-12-20
Posts: 13

Re: Help installing Ruby on Rails 1.9.3 + Postgres + NGINX arch 2011.10

How far did you get ?
I have Ruby 1.9.3 along with Rails 3.2.3.
Setting up the rest shouldn't be too problematic after that.

What I would suggest;
First install ruby

pacman -S ruby

after that install rails

gem install rails

The rest is explained in tutorials;
NGNIX => http://kevin.vanzonneveld.net/techblog/ … ntu_lucid/

Postgres => http://oldwiki.rubyonrails.org/rails/pages/PostgreSQL

Last edited by SPK201 (2012-04-11 13:40:19)

Offline

#3 2012-04-11 14:34:19

adamchow
Member
Registered: 2012-04-08
Posts: 7

Re: Help installing Ruby on Rails 1.9.3 + Postgres + NGINX arch 2011.10

Im at the clean installation with the latest updates.

Thanks, I will try out the steps and guides you gave me.  Also did u install Rbenv with your setup? If so how should I do that with the ruby setup?

Offline

#4 2012-04-11 15:06:03

SPK201
Member
Registered: 2011-12-20
Posts: 13

Re: Help installing Ruby on Rails 1.9.3 + Postgres + NGINX arch 2011.10

Rbenv allows different Ruby versions at the same time, right?
No, I don't use multiple versions.

But if you need to, then maybe this will help:

Rbenv FAQ wrote:

rbenv does not install Ruby.
You can build and install Ruby yourself, or use ruby-build to automate the process.

Offline

#5 2012-04-11 15:08:28

adamchow
Member
Registered: 2012-04-08
Posts: 7

Re: Help installing Ruby on Rails 1.9.3 + Postgres + NGINX arch 2011.10

Yep, It manages different versions of ruby.  I guess Ill keep it as one version on the server (production), I will just use rbenv on my local dev machine.

Thanks smile Ill let you know how the installation goes when I have it done.

Offline

#6 2012-04-17 18:10:16

adamchow
Member
Registered: 2012-04-08
Posts: 7

Re: Help installing Ruby on Rails 1.9.3 + Postgres + NGINX arch 2011.10

Currently installing NGINX with passenger... I come across this error

rake aborted!
Command failed with status (1): [g++ -Iext  -D_REENTRANT -I/usr/local/inclu...]

when i ran

sudo passenger-install-nginx-module

from the Arch NGINX wiki.  What is this and how can I fix it? Thanks.

Postgres, Ruby and Rails installed perfectly.

Last edited by adamchow (2012-04-17 18:27:16)

Offline

#7 2012-05-11 16:59:12

sjnims
Member
From: Atlanta, GA
Registered: 2010-11-07
Posts: 9
Website

Re: Help installing Ruby on Rails 1.9.3 + Postgres + NGINX arch 2011.10

A glimmer of hope, found this post here.

It mentions "libcurl4-openssl-dev" - does Arch have a similar package we can install? Maybe this will allow us to run "rake nginx" w/out error...

[steve@McArchy ext]$ rake nginx
(in /home/steve/.gem/ruby/1.9.1/gems/passenger-3.0.12)
g++ -Iext -Iext/common -Iext/libev  -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/common/libpassenger_common/Utils/Base64.o -c ext/common/Utils/Base64.cpp
In file included from ext/common/Utils/Base64.h:34:0,
                 from ext/common/Utils/Base64.cpp:30:
ext/common/Utils/../StaticString.h: In static member function ‘static const char* Passenger::StaticString::memmem(const char*, std::basic_string<char>::size_type, const char*, std::basic_string<char>::size_type)’:
ext/common/Utils/../StaticString.h:66:6: error: ‘ssize_t’ was not declared in this scope
ext/common/Utils/../StaticString.h:66:14: error: expected ‘;’ before ‘new_len’
ext/common/Utils/../StaticString.h:67:10: error: ‘new_len’ was not declared in this scope
rake aborted!
Command failed with status (1): [g++ -Iext -Iext/common -Iext/libev  -D_REE...]

Tasks: TOP => nginx => agents/nginx/PassengerHelperAgent => ext/common/libpassenger_common.a => ext/common/libpassenger_common/Utils/Base64.o
(See full trace by running task with --trace)

Here is the output I receive when trying to use ABS to recompile nginx with passenger support...

[steve@McArchy nginx]$ makepkg -f
==> Making package: nginx 1.2.0-3 (Fri May 11 12:46:53 EDT 2012)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving Sources...
  -> Found nginx-1.2.0.tar.gz
  -> Found nginx
==> Validating source files with md5sums...
    nginx-1.2.0.tar.gz ... Passed
    nginx ... Passed
==> Extracting Sources...
  -> Extracting nginx-1.2.0.tar.gz with bsdtar
==> Removing existing pkg/ directory...
==> Starting build()...
checking for OS
 + Linux 3.0.18-linode43 i686
checking for C compiler ... found
 + using GNU C compiler
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for sys/filio.h ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... found
checking for Linux specific features
checking for epoll ... found
checking for sendfile() ... found
checking for sendfile64() ... found
checking for sys/prctl.h ... found
checking for prctl(PR_SET_DUMPABLE) ... found
checking for sched_setaffinity() ... found
checking for crypt_r() ... found
checking for sys/vfs.h ... found
checking for poll() ... found
checking for /dev/poll ... not found
checking for kqueue ... not found
checking for crypt() ... not found
checking for crypt() in libcrypt ... found
checking for F_READAHEAD ... not found
checking for posix_fadvise() ... found
checking for O_DIRECT ... found
checking for F_NOCACHE ... not found
checking for directio() ... not found
checking for statfs() ... found
checking for statvfs() ... found
checking for dlopen() ... not found
checking for dlopen() in libdl ... found
checking for sched_yield() ... found
checking for SO_SETFIB ... not found
checking for SO_ACCEPTFILTER ... not found
checking for TCP_DEFER_ACCEPT ... found
checking for TCP_KEEPIDLE, TCP_KEEPINTVL, TCP_KEEPCNT ... found
checking for TCP_INFO ... found
checking for accept4() ... found
checking for int size ... 4 bytes
checking for long size ... 4 bytes
checking for long long size ... 8 bytes
checking for void * size ... 4 bytes
checking for uint64_t ... found
checking for sig_atomic_t ... found
checking for sig_atomic_t size ... 4 bytes
checking for socklen_t ... found
checking for in_addr_t ... found
checking for in_port_t ... found
checking for rlim_t ... found
checking for uintptr_t ... uintptr_t found
checking for system endianess ... little endianess
checking for size_t size ... 4 bytes
checking for off_t size ... 8 bytes
checking for time_t size ... 4 bytes
checking for AF_INET6 ... found
checking for setproctitle() ... not found
checking for pread() ... found
checking for pwrite() ... found
checking for sys_nerr ... found
checking for localtime_r() ... found
checking for posix_memalign() ... found
checking for memalign() ... found
checking for mmap(MAP_ANON|MAP_SHARED) ... found
checking for mmap("/dev/zero", MAP_SHARED) ... found
checking for System V shared memory ... found
checking for POSIX semaphores ... not found
checking for POSIX semaphores in libpthread ... found
checking for struct msghdr.msg_control ... found
checking for ioctl(FIONBIO) ... found
checking for struct tm.tm_gmtoff ... found
checking for struct dirent.d_namlen ... not found
checking for struct dirent.d_type ... found
checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
checking for openat(), fstatat() ... found
configuring additional modules
adding module in /home/steve/.gem/ruby/gems/1.9.1/gems/passenger-3.0.12/ext/nginx
./configure: error: no /home/steve/.gem/ruby/gems/1.9.1/gems/passenger-3.0.12/ext/nginx/config was found
==> ERROR: A failure occurred in build().
    Aborting...

...which is strange, because here is the config file the makepkg error mentions:

[steve@McArchy nginx]$ pwd
/home/steve/.gem/ruby/1.9.1/gems/passenger-3.0.12/ext/nginx
[steve@McArchy nginx]$ ls -l -a -p
total 224
drwxr-xr-x  2 steve users  4096 May 11 11:55 ./
drwxr-xr-x 10 steve users  4096 May 11 11:55 ../
-rw-r--r--  1 steve users  2014 May 11 11:55 config
-rw-r--r--  1 steve users 49287 May 11 11:55 Configuration.c
-rw-r--r--  1 steve users  3712 May 11 11:55 Configuration.h
-rw-r--r--  1 steve users 50739 May 11 11:55 ContentHandler.c
-rw-r--r--  1 steve users  2205 May 11 11:55 ContentHandler.h
-rw-r--r--  1 steve users 41942 May 11 11:55 HelperAgent.cpp
-rw-r--r--  1 steve users 18613 May 11 11:55 ngx_http_passenger_module.c
-rw-r--r--  1 steve users  2415 May 11 11:55 ngx_http_passenger_module.h
-rw-r--r--  1 steve users 10497 May 11 11:55 ScgiRequestParser.h
-rw-r--r--  1 steve users  7466 May 11 11:55 StaticContentHandler.c
-rw-r--r--  1 steve users  1770 May 11 11:55 StaticContentHandler.h

Last edited by sjnims (2012-05-11 17:01:51)

Offline

Board footer

Powered by FluxBB