Short HOWTO/FAQ for FreeBSD 9 (Tutorial: How to leave paradi

2.1.1.1. Install Rails Framework.

To view the complete contents of the HOWTO/FAQ: Back to content.

P.S. Sorry for my bad English.
P.P.S. If you find something of interest, tell me: "thank you man" - I will be pleased. If you think that this is useless, do not scold me - I will be unpleasant. If you know a better solution - I'll be glad to see your adjustments.

Code:
=============================================================================
                                  FAQ RoR
=============================================================================
CREATED:
    Author: valsorym
    E-mail: valsorym.e@gmail.com
    
DATE:
    2013.03.23

DESCRIPTION:
    Install Rails Framework.
=============================================================================
-----------------------------------------------------------------------------
Installing.
-----------------------------------------------------------------------------
  I.Installation rails framework.
    **  Use the gem utility.
    # gem install rails

    **  Verify the installation:
        # rehash
        # rails -v
          Rails 3.2.11

    **  Gem short help:
        # gem list - Show list installed gem-packages.
        # gem update - Updtae all gem-packages.
        # gem update --system - Update gem-system.
        # gem update <GEM_PKG_NAME> - Update gem-package, for exmaple:
            > gem update rails - Update rails framework.
        # gem uninstall <GEM_PKG_NAME> - Uninstall gem-package.
        # gem enviroment - Show config RubyGems.

=============================================================================
                                                             Author: valsorym
 
2.1.1.2. Create first RoR app.

To view the complete contents of the HOWTO/FAQ: Back to content.

P.S. Sorry for my bad English.
P.P.S. If you find something of interest, tell me: "thank you man" - I will be pleased. If you think that this is useless, do not scold me - I will be unpleasant. If you know a better solution - I'll be glad to see your adjustments.

Code:
=============================================================================
                                   FAQ RoR
=============================================================================
CREATED:
    Author: valsorym
    E-mail: valsorym.e@gmail.com
    
DATE:
    2013.03.23

DESCRIPTION:
    Create First RoR App.
=============================================================================
-----------------------------------------------------------------------------
Create first RoR app.
-----------------------------------------------------------------------------
  I.Create work directory.
    **  For example, our work directory - /heap/RoR/.
    # mkdir -p /heap/RoR

 II.Create RoR app.
    **  To create a project, you should have enough rights.
    **  Our first project  have a name - hello-ror.
    # cd /heap/RoR/
    # rails new hello-ror

III.Run RoR Server.
    # cd /heap/RoR/hello-ror
    # rails server

    **  If the server does not start and displays an error like:
[ E R R O R ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/usr/local/lib/ruby/gems/1.9/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in
`autodetect': Could not find a JavaScript runtime. See https://github.com/sst
ephenson/execjs for a list of available runtimes.
(ExecJS::RuntimeUnavailable)
    from /usr/local/lib/ruby/gems/1.9/gems/execjs-1.4.0/lib/execjs.rb:5:in `<m
odule:ExecJS>'
    from /usr/local/lib/ruby/gems/1.9/gems/execjs-1.4.0/lib/execjs.rb:4:in `<t
op (required)>'
    from /usr/local/lib/ruby/gems/1.9/gems/coffee-script-2.2.0/lib/coffee_scri
pt.rb:1:in `require'
    from /usr/local/lib/ruby/gems/1.9/gems/coffee-script-2.2.0/lib/coffee_scri
pt.rb:1:in `<top (required)>'
   ... 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        
        A.  Add in Gemfile next line:
            # echo "gem 'therubyracer'" >> Gemfile
            # rails server

        B.  Panacea.
            **  In order for such an error does not happen again - you need to
                install Node.js.
            **  In most cases, devel/libehetsinfo already installed.
            # setenv BATCH yes
            # cd /usr/ports/devel/libexecinfo
            # make && make install clean

            # cd cd /usr/ports/www/node
            # make && make install clean

        **  Then start the server again: 
            # rails server

 IV.Open RoR App.
    **  If the server is successfully launched - open in your browser:
        http://localhost:3000/

=============================================================================
                                                             Author: valsorym
 
@valsorym

First, you did a great work! :beergrin

Second, you should correct the link to 4.3.12. X11 Xfce4 because is linked to 4.3.11. X11 Xcompmgr. Anyway, I'll take a more exhaustive read.

Third, you can add to Section 4.3.9. X11 Dwm an standardized example of .xinitrc (modifies mine if you want).

29fz2q.jpg

Code:
# Set keyboard layout to English
setxkbmap -layout en

# Loop
while true
do
        xsetroot -name "vol/pcm: $( (/usr/sbin/mixer -s vol 2> /dev/null || echo - ) | cut -d ':' -f 2)/$( (/usr/sbin/mixer -s pcm 2> /dev/null || echo - ) | cut -d ':' -f 2) | bat: $(/usr/sbin/acpiconf -i0 | grep "Remaining capacity" | awk '{print $3}') temp: $(sysctl -n dev.cpu.0.temperature)/$(sysctl -n dev.cpu.1.temperature) | $(/bin/date "+%e %a %H:%M")"
        # Update every 1s
        sleep 1
done &

# Set wallpaper
feh --bg-scale ~/wallpaper/named-wallpaper.png

# Run dwm
exec dwm

As clarification, in the above example to set wallpaper should install graphics/feh ;)
 
Last edited by a moderator:
cpu82 said:
@valsorym

First, you did a great work! :beergrin

Second, you should correct the link to 4.3.12. X11 Xfce4 because is linked to 4.3.11. X11 Xcompmgr. Anyway, I'll take a more exhaustive read.

Thanks,
And, I corrected this misunderstanding.


cpu82 said:
@valsorym

Third, you can add to Section 4.3.9. X11 Dwm an standardized example of .xinitrc (modifies mine if you want).


Code:
# Set keyboard layout to English
setxkbmap -layout en

# Loop
while true
do
        xsetroot -name "vol/pcm: $( (/usr/sbin/mixer -s vol 2> /dev/null || echo - ) | cut -d ':' -f 2)/$( (/usr/sbin/mixer -s pcm 2> /dev/null || echo - ) | cut -d ':' -f 2) | bat: $(/usr/sbin/acpiconf -i0 | grep "Remaining capacity" | awk '{print $3}') temp: $(sysctl -n dev.cpu.0.temperature)/$(sysctl -n dev.cpu.1.temperature) | $(/bin/date "+%e %a %H:%M")"
        # Update every 1s
        sleep 1
done &

# Set wallpaper
feh --bg-scale ~/wallpaper/named-wallpaper.png

# Run dwm
exec dwm

As clarification, in the above example to set wallpaper should install graphics/feh ;)

Hi again,
I have not forgotten about xinitrc. This fasting is very big and it is divided into two parts.
At the top of the post is a link to the second part: :p
4.3.9. X11 Dwm (Ptr 1).
To view the complete contents of the HOWTO/FAQ: Back to content.
Go to 4.3.9. X11 Dwm (Ptr 2).

As for graphics/feh - I think it is not appropriate for x11-wm/dwm - this is a tile window manager and desktop is virtually no time to be seen (it's closed window), but it is well suited for x11-wm/openbox. :stud
 
Last edited by a moderator:
Sorry for the noise. Anyway, can help to complete yours :e

PS. So you can add various suggested applications for the Dynamic Window Manager (DWM). I use it on my ASUS Eee PC 1018P and works great.
 
Back
Top