npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

railsenv

v1.0.3

Published

Ruby on Rails development environment with Vagrant (Windows support) Edit

Downloads

2

Readme

railsenv - Rails development on Windows, Mac and Unix

Railsenv is an environment for private Ruby on Rails projects or big development-teams. This environment runs on Windows, Mac and unix systems. The railsenv-environment includes a virtual server (Ubuntu 16.04 xenial) with a lot of pre-installed good stuff you need to develop Rails applications.

By installing rbenv, rails, mysql etc. on a virtual server, instead of your main system, your computer stays clean and there's no risks of breaking any configurations. And if you accidentally break something within your Railsenv system, simply just reinstall Railsenv and continue your development in a new fresh environment.

All unix commands, like rails server, rake db:migrate & rake guard and all gems like livereload, sidekiq or sass are available and runs within the virtual environment, while your project folder still is accessible from your main system. That means that you can use your favourite code editor like Sublime Text / Visual Studio Code or tools like Github Desktop.

Windows 10: This environment works at least as good on OSX or Linux, but the main purpose of the development was to create a sustainable development environment for my new PC with Windows 10. Running RoR directly on the Windows system didn't work good at all, and when running through Bash on Ubuntu on Windows - even if it worked sometimes - the performance was really bad. Rails works best in a real Unix environment - that's why I created railsenv - an Ubuntu environment 100% separeted from your main system.

Included software & versions
  • rbenv, 1.1.1
  • ruby, 2.3.1
  • nodejs, 8.8.1
  • mysql, 14.14
  • postgree sql, 9.5.9
  • redis, 4.0.2
  • openssh, 7.2p2
  • bash, 4.3.48
  • and many more goodies..

Getting Started

0. Install required software

Make sure you've installed Nodejs, VirtualBox 5.1, as well as Vagrant before you move on with railsenv. Don't be afraid if all these softwares are new to you, all of them comes with an easy installer for every platform.

Windows / Mac
Ubuntu / Debian

Follow this tutorial to install Virtualbox on your dist, and then install NodeJS & Vagrant via apt-get:

 $ sudo apt-get update
 $ sudo apt-get install nodejs
 $ sudo apt-get install npm # Node Package Manager
 $ sudo apt-get install vagrant

1. Install Railsenv

Open a new terminal window (or the Command Prompt if you're on Windows) and install railsenv globally using Node Package Manager (npm).

Windows 10: Make sure that you install all programs in the same environment. If you've installed Node, VirtualBox and Vagrant on your main system, you must install railsenv via your Command Prompt and not via WSL/"Bash on Ubuntu on Windows".

 $ npm install -g railsenv

Confirm that railsenv and all of the required softwares are installed correctly by running check:

 $ railsenv check
-----------------------------------
[ok] Found VirtualBox
[ok] Found Vagrant
-----------------------------------
Test passed with 0 errors and your system is compatible with Railsenv.
Provision and start your development server by running the command: 'railsenv start'

2. Start your railsenv-environment

If Railsenv was installed correctly, you should be able to access it from any folder on your system via your terminal or Command Prompt. Run railsenv start to start your railsenv-environment. If this is the first time you're using railsenv on your system, it will automatically download our modified copy of Ubuntu from the Vagrant Cloud. The download process may take a while depending on your internet speed, so this is a perfect time to grab a coffee from the coffe machine. Total download size is ~700MB.

  $ railsenv start 

Commands

Start development server

$ railsenv start

Stop development server

$ railsenv stop

Restart development server

$ railsenv restart

Check if development is up or down

$ railsenv status

Open virtual server in a bash/SSH window

$ railsenv ssh

Open & edit config.yaml in your default text editor.

$ railsenv config

Show help screen with instructions and arguments for all commands

$ railsenv help

Check if your system is ready for a railsenv environment.

$ railsenv check

Customization

Ruby version

Not happy with my choice of ruby 2.3.1? No problem, it's easy to change the ruby version to whatever pleasures your needs. First, login to your environment with ssh by running the command railsenv ssh , then run these commands in your rails-environment:

ubuntu@ubuntu-xenial:~$ rbenv install 2.4.2
ubuntu@ubuntu-xenial:~$ rbenv global 2.4.2
ubuntu@ubuntu-xenial:~$ rbenv rehash

Confirm your version change:

$ ruby -v

Credentials

SSH & mySQL

  • host: 192.168.0.70
  • user: ubuntu
  • password: secret

KIAA (Known issues and answers)

Cannot render console from ip! Allowed networks: 127.0.0.1 **

Whitelist your local network by adding the following code to config/environments/development.rb:

config.web_console.whitelisted_ips = ['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16']